summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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());