]> git.mxchange.org Git - friendica.git/commitdiff
Chec for missing profile first
authorMichael <heluecht@pirati.ca>
Tue, 15 Jun 2021 22:01:30 +0000 (22:01 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 15 Jun 2021 22:01:30 +0000 (22:01 +0000)
src/Model/User.php

index 641148f74292f50e66e7dd7583c85ea56cdb17fc..a615f96bb37bc19abd67edf4a943c13f6339c83e 100644 (file)
@@ -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);
                }