Added check and repair for missing self contact
This commit is contained in:
parent
7d111e2a6f
commit
e012730e52
|
@ -197,8 +197,12 @@ class User
|
|||
{
|
||||
$owner = DBA::selectFirst('owner-view', [], ['uid' => $uid]);
|
||||
if (!DBA::isResult($owner)) {
|
||||
if (!DBA::exists('user', ['uid' => $uid]) || !$check_valid) {
|
||||
return false;
|
||||
}
|
||||
Contact::createSelfFromUserId($uid);
|
||||
$owner = self::getOwnerDataById($uid, false);
|
||||
}
|
||||
|
||||
if (empty($owner['nickname'])) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user