From 9beb5a90ea6d81235d148f7e27282a4a9a83353a Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 10 Apr 2024 12:35:02 +0200 Subject: [PATCH] fix(LDAP): do not count mapped users x-times active configs - the method counts all rows in the mapping tables, which are not specific to single configurations, but contains users from all Signed-off-by: Arthur Schiwon --- apps/user_ldap/lib/User_Proxy.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/user_ldap/lib/User_Proxy.php b/apps/user_ldap/lib/User_Proxy.php index 934bed7d450..9fcd9548f73 100644 --- a/apps/user_ldap/lib/User_Proxy.php +++ b/apps/user_ldap/lib/User_Proxy.php @@ -415,12 +415,7 @@ class User_Proxy extends Proxy implements IUserBackend, UserInterface, IUserLDAP */ public function countMappedUsers(): int { $this->setup(); - - $users = 0; - foreach ($this->backends as $backend) { - $users += $backend->countMappedUsers(); - } - return $users; + return $this->refBackend?->countMappedUsers() ?? 0; } /**