]> source.dussan.org Git - nextcloud-server.git/commitdiff
find users which are in the same group
authorBjoern Schiessle <schiessle@owncloud.com>
Tue, 8 Oct 2013 14:43:23 +0000 (16:43 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Tue, 8 Oct 2013 14:43:23 +0000 (16:43 +0200)
core/ajax/share.php
lib/private/group.php

index 1166ea3198a2d4688151516cbe56c50f4c481219..dbad8f2e971e12a8a4223dcfd9a01de3cf43ebe7 100644 (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);
                                        }
index ba93dc129a11f09c3972446246af9f94f235ca3d..9144ef683b6129cbab6bcca85923eb93a38dbff2 100644 (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();