summaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-06-15 22:52:30 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-06-15 22:54:28 +0200
commitcc2d58a850f9a8336344d00be8ac82e3e33b78ee (patch)
tree58421896bc7ceec9fb23c74667194f8694efcc9b /apps/provisioning_api
parent2ec4fb43278a9183df5565534aa6b1bc956f5e2d (diff)
downloadnextcloud-server-cc2d58a850f9a8336344d00be8ac82e3e33b78ee.tar.gz
nextcloud-server-cc2d58a850f9a8336344d00be8ac82e3e33b78ee.zip
Keep userids as keys on group search
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/provisioning_api')
-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) {