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 AndyScherzinger committed Jun 11, 2024
1 parent 907a12b commit cbaba87
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 cbaba87

Please sign in to comment.