fix login

This commit is contained in:
2023-10-12 10:45:39 +03:00
parent c691273d02
commit 03b25a796d
2 changed files with 15 additions and 6 deletions

View File

@ -17,8 +17,11 @@ class User extends \common\models\User
'email',
'username',
'userCard' => function () {
$userCard = new UserCardSearch();
return ProfileService::getProfileById($this->userCard->id);
if(isset($this->userCard->id)){
return ProfileService::getProfileById($this->userCard->id);
}
return null;
}
];
}