From: Michael Date: Sat, 25 Apr 2020 07:29:38 +0000 (+0000) Subject: Added check and repair for missing self contact X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e012730e52084f5917c7196ddd015e66d6e2061d;p=friendica.git Added check and repair for missing self contact --- diff --git a/src/Model/User.php b/src/Model/User.php index e7f2f89ad6..be71bcf645 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -197,7 +197,11 @@ class User { $owner = DBA::selectFirst('owner-view', [], ['uid' => $uid]); 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'])) {