diff options
author | Robin McCorkell <rmccorkell@owncloud.com> | 2015-08-18 22:49:29 +0100 |
---|---|---|
committer | Robin McCorkell <rmccorkell@owncloud.com> | 2015-08-19 15:26:38 +0100 |
commit | d577aad4ac876c1ed29f7b81199f607da581239b (patch) | |
tree | 55bca408402528a7fff2e4d5a0acb5aa7e4ee534 /apps/files_external/ajax/applicable.php | |
parent | 5fd36d017ecdbce61dcf1c67ae04c8c0be81a4bf (diff) | |
download | nextcloud-server-d577aad4ac876c1ed29f7b81199f607da581239b.tar.gz nextcloud-server-d577aad4ac876c1ed29f7b81199f607da581239b.zip |
Use OCP classes as much as possible in files_external
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); |