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