From a9d86c1f95a013d37be90a1974545b377de0c7e7 Mon Sep 17 00:00:00 2001
From: Côme Chilliet <come.chilliet@nextcloud.com>
Date: Thu, 19 Oct 2023 10:35:49 +0200
Subject: Invert parameter order in getDisabledUserList to be consistent
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
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 <come.chilliet@nextcloud.com>
(cherry picked from commit 85e7887e0764a9347bbbb10812459d95ccdfa6d4)
---
 apps/user_ldap/lib/User_LDAP.php  | 2 +-
 apps/user_ldap/lib/User_Proxy.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'apps/user_ldap/lib')

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(
-- 
cgit v1.2.3