Skip to content

Commit

Permalink
Invert parameter order in getDisabledUserList to be consistent
Browse files Browse the repository at this point in the history
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 85e7887)
  • Loading branch information
come-nc authored and Pytal committed Dec 5, 2023
1 parent 29f74be commit 9c11e2d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/user_ldap/lib/User_LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ public function setUserEnabled(string $uid, bool $enabled, callable $queryDataba
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');
}
}
2 changes: 1 addition & 1 deletion apps/user_ldap/lib/User_Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ public function setUserEnabled(string $uid, bool $enabled, callable $queryDataba
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(
Expand Down
2 changes: 1 addition & 1 deletion lib/public/User/Backend/IProvideEnabledStateBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ public function setUserEnabled(string $uid, bool $enabled, callable $queryDataba
*
* @return string[]
*/
public function getDisabledUserList(int $offset = 0, ?int $limit = null): array;
public function getDisabledUserList(?int $limit = null, int $offset = 0): array;
}

0 comments on commit 9c11e2d

Please sign in to comment.