Skip to content

Commit

Permalink
fix: Only list remnants as disabled if option is enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc authored and backportbot[bot] committed Jun 11, 2024
1 parent 84a9b08 commit 6a8446f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/user_ldap/lib/User_Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@ public function setUserEnabled(string $uid, bool $enabled, callable $queryDataba
}

public function getDisabledUserList(?int $limit = null, int $offset = 0, string $search = ''): array {
if ((int)$this->getAccess(array_key_first($this->backends) ?? '')->connection->markRemnantsAsDisabled !== 1) {
return [];
}
$disabledUsers = $this->deletedUsersIndex->getUsers();
if ($search !== '') {
$disabledUsers = array_filter(
Expand Down

0 comments on commit 6a8446f

Please sign in to comment.