]> source.dussan.org Git - nextcloud-server.git/commitdiff
Invert parameter order in getDisabledUserList to be consistent 40169/head
authorCôme Chilliet <come.chilliet@nextcloud.com>
Thu, 19 Oct 2023 08:35:49 +0000 (10:35 +0200)
committerChristopher Ng <chrng8@gmail.com>
Fri, 1 Dec 2023 01:15:12 +0000 (17:15 -0800)
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 <come.chilliet@nextcloud.com>
apps/user_ldap/lib/User_LDAP.php
apps/user_ldap/lib/User_Proxy.php
lib/public/User/Backend/IProvideEnabledStateBackend.php

index f9ae6bbee66d0431b75343b63519f784961e8327..d787bfea4d40c7b7320e59688e09f1d7a22f3659 100644 (file)
@@ -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');
        }
 }
index 919cddd99bef6c8baaa460d41d3eabb312c1c85b..934bed7d450474b4548b4f0ba9a84dc00f0ac64a 100644 (file)
@@ -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(
index d03beacd7b858e57bf5c03bd983907f95e82ffdf..f12d99fd1a645e2cc45164f7f569365e0ace7bc2 100644 (file)
@@ -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;
 }