diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-04-06 20:56:02 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-05-16 09:50:20 +0200 |
commit | 2ae82137cd816b53cdf60ecba986e938f81d09e9 (patch) | |
tree | 38011ecb5fb6594f6d18a14546f62ba166f0fe83 /settings/users.php | |
parent | c8f670dd8f2982f455662a24be67ad89f8ca2915 (diff) | |
download | nextcloud-server-2ae82137cd816b53cdf60ecba986e938f81d09e9.tar.gz nextcloud-server-2ae82137cd816b53cdf60ecba986e938f81d09e9.zip |
Group filtering, disable state, ocs api final update
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'settings/users.php')
-rw-r--r-- | settings/users.php | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/settings/users.php b/settings/users.php index af0bf1dd4da..62be3322bee 100644 --- a/settings/users.php +++ b/settings/users.php @@ -113,16 +113,22 @@ $disabledUsersGroup = [ $allGroups = array_merge_recursive($adminGroup, $groups); /* QUOTAS PRESETS */ -$quotaPreset=$config->getAppValue('files', 'quota_preset', '1 GB, 5 GB, 10 GB'); -$quotaPreset=explode(',', $quotaPreset); -foreach($quotaPreset as &$preset) { - $preset=trim($preset); +$quotaPreset = $config->getAppValue('files', 'quota_preset', '1 GB, 5 GB, 10 GB'); +$quotaPreset = explode(',', $quotaPreset); +foreach ($quotaPreset as &$preset) { + $preset = trim($preset); } -$quotaPreset=array_diff($quotaPreset, array('default', 'none')); -$defaultQuota=$config->getAppValue('files', 'default_quota', 'none'); +$quotaPreset = array_diff($quotaPreset, array('default', 'none')); +$defaultQuota = $config->getAppValue('files', 'default_quota', 'none'); \OC::$server->getEventDispatcher()->dispatch('OC\Settings\Users::loadAdditionalScripts'); +/* TOTAL USERS COUNT */ +function addition($v, $w) { + return $v+$w; +} +$userCount = array_reduce($userManager->countUsers(), 'addition', 0); + /* FINAL DATA */ $serverData = array(); // groups @@ -132,7 +138,7 @@ $serverData['subadmingroups'] = $groups; $serverData['subadmins'] = $subAdmins; $serverData['sortGroups'] = $sortGroupsBy; $serverData['quotaPreset'] = $quotaPreset; -$serverData['userCount'] = $userManager->countUsers(); +$serverData['userCount'] = $userCount-$disabledUsers; // Settings $serverData['defaultQuota'] = $defaultQuota; $serverData['canChangePassword'] = $canChangePassword; |