Merge pull request #10407 from annando/add-profile

Add a profile entry if missing
pull/10406/head
Hypolite Petovan 2021-06-15 22:12:59 -04:00 zatwierdzone przez GitHub
commit 9039d812f1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

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