summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-06-18 16:43:06 +0200
committerGitHub <noreply@github.com>2018-06-18 16:43:06 +0200
commit6b6c43bf79fdc58401f55361f21b3450c08f39ce (patch)
tree2cc0d605761fd5f44cf523f89cd2b55c856f1ae3 /apps
parent60adc92eb5a078b327ca2c1139a2fc1d729f714f (diff)
parent0f84351a762b83322ed556e3d023935720fc6fa4 (diff)
downloadnextcloud-server-6b6c43bf79fdc58401f55361f21b3450c08f39ce.tar.gz
nextcloud-server-6b6c43bf79fdc58401f55361f21b3450c08f39ce.zip
Merge pull request #9884 from nextcloud/groups-search-use-proper-keys
Add search to users details groups
Diffstat (limited to 'apps')
-rw-r--r--apps/provisioning_api/lib/Controller/GroupsController.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/provisioning_api/lib/Controller/GroupsController.php b/apps/provisioning_api/lib/Controller/GroupsController.php
index 5114c6f01d5..765a7ea48e8 100644
--- a/apps/provisioning_api/lib/Controller/GroupsController.php
+++ b/apps/provisioning_api/lib/Controller/GroupsController.php
@@ -177,12 +177,13 @@ class GroupsController extends AUserData {
* @NoAdminRequired
*
* @param string $groupId
+ * @param string $search
* @param int $limit
* @param int $offset
* @return DataResponse
* @throws OCSException
*/
- public function getGroupUsersDetails(string $groupId, int $limit = null, int $offset = 0): DataResponse {
+ public function getGroupUsersDetails(string $groupId, string $search = '', int $limit = null, int $offset = 0): DataResponse {
$user = $this->userSession->getUser();
$isSubadminOfGroup = false;
@@ -197,9 +198,9 @@ class GroupsController extends AUserData {
// Check subadmin has access to this group
if($this->groupManager->isAdmin($user->getUID())
|| $isSubadminOfGroup) {
- $users = $this->groupManager->get($groupId)->getUsers();
+ $users = $this->groupManager->get($groupId)->searchUsers($search, $limit, $offset);
+
// Extract required number
- $users = array_slice($users, $offset, $limit);
$users = array_keys($users);
$usersDetails = [];
foreach ($users as $userId) {