Merge pull request #15169 from rullzer/fix_displayNamesInGroup
Groupmanagers displayNamesInGroup should actually search in displaynames
This commit is contained in:
commit
bf17ac929d
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue