Commit bf17ac92 authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #15169 from rullzer/fix_displayNamesInGroup

Groupmanagers displayNamesInGroup should actually search in displaynames
parents 308a43a1 4163a5ef
......@@ -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);
}
......
......@@ -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;
......
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment