find users which are in the same group

This commit is contained in:
Bjoern Schiessle 2013-10-08 16:43:23 +02:00
parent 6284ab31de
commit 835f36cb09
2 changed files with 2 additions and 2 deletions

View File

@ -293,7 +293,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
while ($count < 15 && count($users) == $limit) {
$limit = 15 - $count;
if ($sharePolicy == 'groups_only') {
$users = OC_Group::DisplayNamesInGroups($groups, $_GET['search'], $limit, $offset);
$users = OC_Group::DisplayNamesInGroups($usergroups, $_GET['search'], $limit, $offset);
} else {
$users = OC_User::getDisplayNames($_GET['search'], $limit, $offset);
}

View File

@ -265,7 +265,7 @@ class OC_Group {
public static function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
$group = self::getManager()->get($gid);
if ($group) {
$users = $group->searchDisplayName($search . $limit, $offset);
$users = $group->searchDisplayName($search, $limit, $offset);
$displayNames = array();
foreach ($users as $user) {
$displayNames[] = $user->getDisplayName();