From 5f27f71c325eed82e4b6b25dcd0cee6af9a96cd4 Mon Sep 17 00:00:00 2001 From: simon <31130607+forgive38@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:36:32 +0200 Subject: [PATCH] pkp/pkp-lib#10175 add filter by context to api users --- api/v1/users/PKPUserController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/v1/users/PKPUserController.php b/api/v1/users/PKPUserController.php index 3a1df17a36a..d2e632b3d2f 100644 --- a/api/v1/users/PKPUserController.php +++ b/api/v1/users/PKPUserController.php @@ -165,7 +165,8 @@ public function getMany(Request $request): JsonResponse ->orderBy($orderBy, $orderDirection, [Locale::getLocale(), Application::get()->getRequest()->getSite()->getPrimaryLocale()]) ->limit($params['count'] ?? null) ->offset($params['offset'] ?? null) - ->filterByStatus($params['status'] ?? $collector::STATUS_ALL); + ->filterByStatus($params['status'] ?? $collector::STATUS_ALL) + ->filterByContextIds([ $params['contextId'] ]); $users = $collector->getMany();