More fixes

This commit is contained in:
Julius Haertl
2016-07-06 09:00:25 +02:00
parent 0330c01600
commit 4fb6248336
8 changed files with 82 additions and 81 deletions

View File

@@ -29,17 +29,17 @@ class ShareController extends Controller {
public function searchUser($search) {
$limit = null;
$offset = null;
$result = [];
$groups = [];
foreach ($this->groupManager->search($search, $limit, $offset) as $group) {
$groups[] = $group->getGID();
$result[] = array('type'=>'group', 'id'=>$group->getGID());
}
$users = [];
foreach ($this->userManager->searchDisplayName($search, $limit, $offset) as $user) {
$users[] = $user->getDisplayName();
$result[] = array('type'=>'group', 'id'=>$user->getUID(), 'displayName'=>$user->getDisplayName());
}
return array(
'users' => $users,
'groups' => $groups
);
return $result;
}
}