Do not force isAdmin as true and so the list is filtered correctly
This commit is contained in:
parent
e6c75aa974
commit
0dc67cb1c2
1 changed files with 1 additions and 3 deletions
|
@ -38,9 +38,7 @@ $adminGroups = array();
|
|||
$groupManager = \OC_Group::getManager();
|
||||
$isAdmin = OC_User::isAdminUser(OC_User::getUser());
|
||||
|
||||
//we pass isAdmin as true, because OC_SubAdmin has no search feature,
|
||||
//groups will be filtered out later
|
||||
$groupsInfo = new \OC\Group\MetaData(OC_User::getUser(), true, $groupManager);
|
||||
$groupsInfo = new \OC\Group\MetaData(OC_User::getUser(), $isAdmin, $groupManager);
|
||||
$groupsInfo->setSorting($groupsInfo::SORT_USERCOUNT);
|
||||
list($adminGroups, $groups) = $groupsInfo->get($groupPattern, $pattern);
|
||||
|
||||
|
|
Loading…
Reference in a new issue