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 677d83d45f
commit cb6a3e2617
1 changed files with 5 additions and 1 deletions

View File

@ -282,7 +282,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;
}
}
}
}