summaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-03-23 18:08:54 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-04-05 17:09:00 +0200
commitf4e84e172752fb25898cbceddb7cbad4abde21d6 (patch)
treee287a1a339c12c1ac6871cce8421f1a6ec94df72 /apps/provisioning_api/lib
parent68ae4394f712d884dc4814897cf97986f3cf71b3 (diff)
downloadnextcloud-server-f4e84e172752fb25898cbceddb7cbad4abde21d6.tar.gz
nextcloud-server-f4e84e172752fb25898cbceddb7cbad4abde21d6.zip
Limit and offset
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/provisioning_api/lib')
-rw-r--r--apps/provisioning_api/lib/Controller/GroupsController.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/provisioning_api/lib/Controller/GroupsController.php b/apps/provisioning_api/lib/Controller/GroupsController.php
index dc018fd94a9..c16c8266639 100644
--- a/apps/provisioning_api/lib/Controller/GroupsController.php
+++ b/apps/provisioning_api/lib/Controller/GroupsController.php
@@ -187,10 +187,12 @@ class GroupsController extends OCSController {
* @NoAdminRequired
*
* @param string $groupId
+ * @param int $limit
+ * @param int $offset
* @return DataResponse
* @throws OCSException
*/
- public function getGroupUsersDetails(string $groupId): DataResponse {
+ public function getGroupUsersDetails(string $groupId, $limit = null, $offset = 0): DataResponse {
$user = $this->userSession->getUser();
// Check the group exists
@@ -208,6 +210,8 @@ class GroupsController extends OCSController {
if($this->groupManager->isAdmin($user->getUID())
|| $isSubadminOfGroup) {
$users = $this->groupManager->get($groupId)->getUsers();
+ // Extract required number
+ $users = array_slice($users, $offset, $limit);
$users = array_map(function($user) {
/** @var IUser $user */
return $this->userController->getUserData($user->getUID());