From 153b7f441b006d5b5ae630fc5b17772ee4ff9781 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 10 Mar 2016 13:42:11 +0100 Subject: * retrieving User record for DbUser properly --- app/php/user/DbUser.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/php/user/DbUser.php b/app/php/user/DbUser.php index e864bc0..c8273f7 100644 --- a/app/php/user/DbUser.php +++ b/app/php/user/DbUser.php @@ -12,6 +12,9 @@ class DbUser extends TDbUser { } public function getDbRecord() { + if (!$this->_record) { + $this->_record = User::finder()->findByLogin($this->Name); + } return $this->_record; } @@ -21,7 +24,7 @@ class DbUser extends TDbUser { return NULL; } $user = new DbUser($this->Manager); - $user->DbRecord = $dbUser; + $user->setDbRecord($dbUser); $user->Name = $dbUser->Login; if ($dbUser->IsAdmin) { $user->Roles = 'Admin'; -- cgit v1.2.3