diff --git a/apps/user_ldap/lib/User_Proxy.php b/apps/user_ldap/lib/User_Proxy.php index 96cd7b4763757..7b927100fe5db 100644 --- a/apps/user_ldap/lib/User_Proxy.php +++ b/apps/user_ldap/lib/User_Proxy.php @@ -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(