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 committed Jun 6, 2024
1 parent edd59ee commit e14620c
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 @@ -440,6 +440,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 e14620c

Please sign in to comment.