Chec for missing profile first

2022.09-rc
Michael 2021-06-15 22:01:30 +00:00
rodzic e994d02791
commit c17f23423f
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -391,12 +391,12 @@ class User
if (!DBA::exists('user', ['uid' => $uid]) || !$repairMissing) {
return false;
}
if (!DBA::exists('contact', ['uid' => $uid, 'self' => true])) {
Contact::createSelfFromUserId($uid);
}
if (!DBA::exists('profile', ['uid' => $uid])) {
DBA::insert('profile', ['uid' => $uid]);
}
if (!DBA::exists('contact', ['uid' => $uid, 'self' => true])) {
Contact::createSelfFromUserId($uid);
}
$owner = self::getOwnerDataById($uid, false);
}