diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 2251520a92..38f1fb2159 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -760,7 +760,7 @@ Http::get('/v1/users') $targets = $dbForProject->find('targets', [ Query::equal('userInternalId', $sequences), - Query::limit(PHP_INT_MAX), + Query::limit(\count($sequences) * APP_LIMIT_SUBQUERY), ]); $targetsByUser = [];