Added check and repair for missing self contact

This commit is contained in:
Michael 2020-04-25 07:29:38 +00:00
parent 7d111e2a6f
commit e012730e52
1 changed files with 5 additions and 1 deletions

View File

@ -197,7 +197,11 @@ class User
{ {
$owner = DBA::selectFirst('owner-view', [], ['uid' => $uid]); $owner = DBA::selectFirst('owner-view', [], ['uid' => $uid]);
if (!DBA::isResult($owner)) { if (!DBA::isResult($owner)) {
return false; if (!DBA::exists('user', ['uid' => $uid]) || !$check_valid) {
return false;
}
Contact::createSelfFromUserId($uid);
$owner = self::getOwnerDataById($uid, false);
} }
if (empty($owner['nickname'])) { if (empty($owner['nickname'])) {