Merge pull request #9664 from annando/delete-contacts
[friendica.git/.git] / src / Model / User.php
index 96a5bbf..6960c5c 100644 (file)
@@ -371,12 +371,12 @@ class User
        /**
         * Get owner data by user id
         *
-        * @param int $uid
-        * @param boolean $check_valid Test if data is invalid and correct it
+        * @param int     $uid
+        * @param boolean $repairMissing Repair the owner data if it's missing
         * @return boolean|array
         * @throws Exception
         */
-       public static function getOwnerDataById(int $uid, bool $check_valid = true)
+       public static function getOwnerDataById(int $uid, bool $repairMissing = true)
        {
                if ($uid == 0) {
                        return self::getSystemAccount();
@@ -388,7 +388,7 @@ class User
 
                $owner = DBA::selectFirst('owner-view', [], ['uid' => $uid]);
                if (!DBA::isResult($owner)) {
-                       if (!DBA::exists('user', ['uid' => $uid]) || !$check_valid) {
+                       if (!DBA::exists('user', ['uid' => $uid]) || !$repairMissing) {
                                return false;
                        }
                        Contact::createSelfFromUserId($uid);
@@ -399,7 +399,7 @@ class User
                        return false;
                }
 
-               if (!$check_valid) {
+               if (!$repairMissing) {
                        return $owner;
                }