From 8c17a6b4d9cc31b7b89f2a1a39cfa99812978283 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 15 Dec 2020 09:41:10 -0500 Subject: [PATCH] Rename Model\User::getOwnerDataById parameter to better reflect intent --- src/Model/User.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Model/User.php b/src/Model/User.php index bcd555a0e..d3f3dfd1a 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -370,12 +370,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(); @@ -387,7 +387,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); @@ -398,7 +398,7 @@ class User return false; } - if (!$check_valid) { + if (!$repairMissing) { return $owner; }