aboutsummaryrefslogtreecommitdiffstats
path: root/settings/users.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-04-15 00:13:23 +0200
committerArthur Schiwon <blizzz@owncloud.com>2014-06-02 12:53:55 +0200
commit249e42c4cdf81c2d1c294a5535c055cdfee992b4 (patch)
tree07d884e082eb686aa93de67693a3296a4c8c08d8 /settings/users.php
parentdbc854d8b8cb0a187859fae174a41de5b296595c (diff)
downloadnextcloud-server-249e42c4cdf81c2d1c294a5535c055cdfee992b4.tar.gz
nextcloud-server-249e42c4cdf81c2d1c294a5535c055cdfee992b4.zip
enable group filtering
Diffstat (limited to 'settings/users.php')
-rw-r--r--settings/users.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/settings/users.php b/settings/users.php
index d6e270bbc32..d3fcbb26a36 100644
--- a/settings/users.php
+++ b/settings/users.php
@@ -22,6 +22,7 @@ $users = array();
$groups = array();
$adminGroup = array();
$userManager = \OC_User::getManager();
+$groupManager = \OC_Group::getManager();
if (isset($_GET['offset'])) {
$offset = $_GET['offset'];
@@ -89,14 +90,18 @@ $sortGroupsKeys = array();
$sortAdminGroupsIndex = 0;
$sortAdminGroupsKeys = array();
foreach( $accessiblegroups as $gid ) {
- $usersInGroup = OC_Group::usersInGroup($gid, '', $limit, $offset);
+ $group = $groupManager->get($gid);
+ if(!$group) {
+ continue;
+ }
+ $usersInGroup = $group->count();
if (!OC_User::isAdminUser($gid)) {
$groups[] = array(
'id' => str_replace(' ','', $gid ),
'name' => $gid,
'useringroup' => $usersInGroup,
);
- $sortGroupsKeys[$sortGroupsIndex] = count($usersInGroup);
+ $sortGroupsKeys[$sortGroupsIndex] = $usersInGroup;
$sortGroupsIndex++;
} else {
$adminGroup[] = array(
@@ -104,7 +109,7 @@ foreach( $accessiblegroups as $gid ) {
'name' => $gid,
'useringroup' => $usersInGroup
);
- $sortAdminGroupsKeys[$sortAdminGroupsIndex] = count($usersInGroup);
+ $sortAdminGroupsKeys[$sortAdminGroupsIndex] = $usersInGroup;
$sortAdminGroupsIndex++;
}
}