From adc43eae9b143c2c89a0fcb3e3222cbd68038217 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Thu, 19 Oct 2023 10:35:49 +0200 Subject: [PATCH] Invert parameter order in getDisabledUserList to be consistent MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- apps/user_ldap/lib/User_LDAP.php | 2 +- apps/user_ldap/lib/User_Proxy.php | 2 +- lib/public/User/Backend/IProvideEnabledStateBackend.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.39.5