diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2024-04-10 12:35:02 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2024-04-10 12:41:55 +0200 |
commit | 9beb5a90ea6d81235d148f7e27282a4a9a83353a (patch) | |
tree | 2b67892aa1ed888d41c1f65262a1daead2515397 | |
parent | e70cf9c14b2fd53ad47452f1b95ad46fce90155b (diff) | |
download | nextcloud-server-fix/noid/ldap-n-counted-mapped-users.tar.gz nextcloud-server-fix/noid/ldap-n-counted-mapped-users.zip |
fix(LDAP): do not count mapped users x-times active configsfix/noid/ldap-n-counted-mapped-users
- 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 <blizzz@arthur-schiwon.de>
-rw-r--r-- | apps/user_ldap/lib/User_Proxy.php | 7 |
1 files changed, 1 insertions, 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; } /** |