From e14620cb15f66c9137c5b30946970a23dbbd9b4a Mon Sep 17 00:00:00 2001 From: =?utf8?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=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- 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 afa4a194182..df9e025f871 100644 --- a/apps/user_ldap/lib/User_Proxy.php +++ b/apps/user_ldap/lib/User_Proxy.php @@ -440,6 +440,9 @@ class User_Proxy extends Proxy implements IUserBackend, UserInterface, IUserLDAP } 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( -- 2.39.5