From cade682752a29bd507eb26810cda0d2d247915e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 16 May 2024 10:58:28 +0200 Subject: [PATCH] fix: Only list remnants as disabled if option is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet Signed-off-by: Louis Chemineau --- apps/user_ldap/lib/User_Proxy.php | 3 +++ 1 file changed, 3 insertions(+) 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(