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

View File

@ -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;