diff options
Diffstat (limited to 'app/php/user/DbUser.php')
-rw-r--r-- | app/php/user/DbUser.php | 5 |
1 files changed, 4 insertions, 1 deletions
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'; |