fix login

This commit is contained in:
apuc committed 2023-10-12 10:45:39 +03:00
1 parent c691273d02
commit 03b25a796d
2 files changed
+15 -6

No files matched your search

+5 -2
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;
}
];
}