diff options
author | yemkareems <yemkareems@gmail.com> | 2024-07-02 10:18:09 +0530 |
---|---|---|
committer | yemkareems <yemkareems@gmail.com> | 2024-07-08 15:42:55 +0530 |
commit | afa51365ffc6d514a96ea6af73e6079726033fb6 (patch) | |
tree | 482bb034a31fdb173cdc2133d15025ca47e9fce6 /apps/provisioning_api/lib/Controller | |
parent | c701ef1ed5b75cf454a261fa2e74b98662b28b7b (diff) | |
download | nextcloud-server-afa51365ffc6d514a96ea6af73e6079726033fb6.tar.gz nextcloud-server-afa51365ffc6d514a96ea6af73e6079726033fb6.zip |
fix: removed the params related to sortMode and order since it sorts by lastLogin
Signed-off-by: yemkareems <yemkareems@gmail.com>
Diffstat (limited to 'apps/provisioning_api/lib/Controller')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index a68bcfa6b29..f494311923e 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -267,14 +267,13 @@ class UsersController extends AUserData { /** * @NoAdminRequired + * @NoCSRFRequired * - * Get the list of disabled users and their details + * Get the list of last logged-in users and their details * * @param string $search Text to search for * @param ?int $limit Limit the amount of users returned * @param int $offset Offset - * @param string $sortMode Field to order the results with - * @param string $sortOrder asc or desc * @return DataResponse<Http::STATUS_OK, array{users: array<string, Provisioning_APIUserDetails|array{id: string}>}, array{}> * * 200: Users details returned based on last logged in information @@ -282,8 +281,6 @@ class UsersController extends AUserData { public function getLastLoggedInUsers(string $search = '', ?int $limit = null, int $offset = 0, - string $sortMode = 'lastLogin', - string $sortOrder = 'desc' ): DataResponse { $currentUser = $this->userSession->getUser(); if ($currentUser === null) { @@ -302,7 +299,7 @@ class UsersController extends AUserData { $uid = $currentUser->getUID(); $subAdminManager = $this->groupManager->getSubAdmin(); if ($this->groupManager->isAdmin($uid)) { - $users = $this->userManager->getUsersSortedByLastLogin($limit, $offset, $search, $sortMode, $sortOrder); + $users = $this->userManager->getUsersSortedByLastLogin($limit, $offset, $search); $users = array_map(fn (IUser $user): string => $user->getUID(), $users); } elseif ($subAdminManager->isSubAdmin($currentUser)) { $subAdminOfGroups = $subAdminManager->getSubAdminsGroups($currentUser); |