diff options
Diffstat (limited to 'lib/private/user/manager.php')
-rw-r--r-- | lib/private/user/manager.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/private/user/manager.php b/lib/private/user/manager.php index 2c56ea261d6..1fc89f8c2c2 100644 --- a/lib/private/user/manager.php +++ b/lib/private/user/manager.php @@ -279,10 +279,15 @@ class Manager extends PublicEmitter implements IUserManager { if ($backend->implementsActions(\OC_User_Backend::COUNT_USERS)) { $backendusers = $backend->countUsers(); if($backendusers !== false) { - if(isset($userCountStatistics[get_class($backend)])) { - $userCountStatistics[get_class($backend)] += $backendusers; + if($backend instanceof \OCP\IUserBackend) { + $name = $backend->getBackendName(); } else { - $userCountStatistics[get_class($backend)] = $backendusers; + $name = get_class($backend); + } + if(isset($userCountStatistics[$name])) { + $userCountStatistics[$name] += $backendusers; + } else { + $userCountStatistics[$name] = $backendusers; } } } |