Add a profile entry if missing

This commit is contained in:
Michael 2021-06-15 21:39:28 +00:00
parent 6a517b4130
commit e994d02791

View file

@ -391,7 +391,12 @@ class User
if (!DBA::exists('user', ['uid' => $uid]) || !$repairMissing) { if (!DBA::exists('user', ['uid' => $uid]) || !$repairMissing) {
return false; 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); $owner = self::getOwnerDataById($uid, false);
} }