From: Côme Chilliet Date: Thu, 19 Oct 2023 08:35:49 +0000 (+0200) Subject: Invert parameter order in getDisabledUserList to be consistent X-Git-Tag: v29.0.0beta1~733^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=adc43eae9b143c2c89a0fcb3e3222cbd68038217;p=nextcloud-server.git Invert parameter order in getDisabledUserList to be consistent This matches what was done in the calls and so fixes getting disabled user list when there are several backends returning disabled users. Signed-off-by: Côme Chilliet --- diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php index f9ae6bbee66..d787bfea4d4 100644 --- a/apps/user_ldap/lib/User_LDAP.php +++ b/apps/user_ldap/lib/User_LDAP.php @@ -682,7 +682,7 @@ class User_LDAP extends BackendUtility implements IUserBackend, UserInterface, I return $enabled; } - public function getDisabledUserList(int $offset = 0, ?int $limit = null): array { + public function getDisabledUserList(?int $limit = null, int $offset = 0): array { throw new \Exception('This is implemented directly in User_Proxy'); } } diff --git a/apps/user_ldap/lib/User_Proxy.php b/apps/user_ldap/lib/User_Proxy.php index 919cddd99be..934bed7d450 100644 --- a/apps/user_ldap/lib/User_Proxy.php +++ b/apps/user_ldap/lib/User_Proxy.php @@ -463,7 +463,7 @@ class User_Proxy extends Proxy implements IUserBackend, UserInterface, IUserLDAP return $this->handleRequest($uid, 'setUserEnabled', [$uid, $enabled, $queryDatabaseValue, $setDatabaseValue]); } - public function getDisabledUserList(int $offset = 0, ?int $limit = null): array { + public function getDisabledUserList(?int $limit = null, int $offset = 0): array { return array_map( fn (OfflineUser $user) => $user->getOCName(), array_slice( diff --git a/lib/public/User/Backend/IProvideEnabledStateBackend.php b/lib/public/User/Backend/IProvideEnabledStateBackend.php index d03beacd7b8..f12d99fd1a6 100644 --- a/lib/public/User/Backend/IProvideEnabledStateBackend.php +++ b/lib/public/User/Backend/IProvideEnabledStateBackend.php @@ -52,5 +52,5 @@ interface IProvideEnabledStateBackend { * * @return string[] */ - public function getDisabledUserList(int $offset = 0, ?int $limit = null): array; + public function getDisabledUserList(?int $limit = null, int $offset = 0): array; }