if backends have the same class name, sum their users up instead of overwriting

This commit is contained in:
Arthur Schiwon 2014-01-08 13:24:28 +01:00
parent 1636c6dbd8
commit cf8fc2294e

View file

@ -273,7 +273,11 @@ class Manager extends PublicEmitter {
if ($backend->implementsActions(\OC_USER_BACKEND_COUNT_USERS)) {
$backendusers = $backend->countUsers();
if($backendusers !== false) {
$userCountStatistics[get_class($backend)] = $backendusers;
if(isset($userCountStatistics[get_class($backend)])) {
$userCountStatistics[get_class($backend)] += $backendusers;
} else {
$userCountStatistics[get_class($backend)] = $backendusers;
}
}
}
}