From: Michael Date: Tue, 15 Jun 2021 21:39:28 +0000 (+0000) Subject: Add a profile entry if missing X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e994d02791b8879ab5d338650f199759d3012074;p=friendica.git Add a profile entry if missing --- diff --git a/src/Model/User.php b/src/Model/User.php index 029613b17b..641148f742 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -391,7 +391,12 @@ class User if (!DBA::exists('user', ['uid' => $uid]) || !$repairMissing) { return false; } - Contact::createSelfFromUserId($uid); + if (!DBA::exists('contact', ['uid' => $uid, 'self' => true])) { + Contact::createSelfFromUserId($uid); + } + if (!DBA::exists('profile', ['uid' => $uid])) { + DBA::insert('profile', ['uid' => $uid]); + } $owner = self::getOwnerDataById($uid, false); }