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 <[email protected]>
  • Loading branch information
come-nc authored and backportbot[bot] committed Jun 11, 2024
1 parent 436663f commit 42049c3
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 42049c3

Please sign in to comment.