Merge pull request #15169 from rullzer/fix_displayNamesInGroup

Groupmanagers displayNamesInGroup should actually search in displaynames
This commit is contained in:
Morris Jobke 2015-03-30 17:04:09 +02:00
commit bf17ac929d
3 changed files with 5 additions and 5 deletions

View File

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

View File

@ -267,7 +267,7 @@ class Manager extends PublicEmitter implements IGroupManager {
}
do {
$filteredUsers = $this->userManager->search($search, $searchLimit, $searchOffset);
$filteredUsers = $this->userManager->searchDisplayName($search, $searchLimit, $searchOffset);
foreach($filteredUsers as $filteredUser) {
if($group->inGroup($filteredUser)) {
$groupUsers[]= $filteredUser;

View File

@ -448,7 +448,7 @@ class Manager extends \Test\TestCase {
$userBackend = $this->getMock('\OC_User_Backend');
$userManager->expects($this->any())
->method('search')
->method('searchDisplayName')
->with('user3')
->will($this->returnCallback(function($search, $limit, $offset) use ($userBackend) {
switch($offset) {
@ -513,7 +513,7 @@ class Manager extends \Test\TestCase {
$userBackend = $this->getMock('\OC_User_Backend');
$userManager->expects($this->any())
->method('search')
->method('searchDisplayName')
->with('user3')
->will($this->returnCallback(function($search, $limit, $offset) use ($userBackend) {
switch($offset) {
@ -580,7 +580,7 @@ class Manager extends \Test\TestCase {
$userBackend = $this->getMock('\OC_User_Backend');
$userManager->expects($this->any())
->method('search')
->method('searchDisplayName')
->with('user3')
->will($this->returnCallback(function($search, $limit, $offset) use ($userBackend) {
switch($offset) {