diff options
Diffstat (limited to 'apps/files_external/ajax/applicable.php')
-rw-r--r-- | apps/files_external/ajax/applicable.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/files_external/ajax/applicable.php b/apps/files_external/ajax/applicable.php index 1b93cc3a1aa..5ae91c8e182 100644 --- a/apps/files_external/ajax/applicable.php +++ b/apps/files_external/ajax/applicable.php @@ -37,8 +37,15 @@ if (isset($_GET['offset'])) { $offset = (int)$_GET['offset']; } -$groups = \OC_Group::getGroups($pattern, $limit, $offset); -$users = \OCP\User::getDisplayNames($pattern, $limit, $offset); +$groups = []; +foreach (\OC::$server->getGroupManager()->search($pattern, $limit, $offset) as $group) { + $groups[$group->getGID()] = $group->getGID(); +} + +$users = []; +foreach (\OC::$server->getUserManager()->searchDisplayName($pattern, $limit, $offset) as $user) { + $users[$user->getUID()] = $user->getDisplayName(); +} $results = array('groups' => $groups, 'users' => $users); |