Skip to content
Snippets Groups Projects
Commit 0ebdda16 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fixes #3281

Closes #3281

Merge request studip/studip!2214
parent 2c4f5a79
No related branches found
No related tags found
No related merge requests found
...@@ -37,12 +37,12 @@ class UsersIndex extends JsonApiController ...@@ -37,12 +37,12 @@ class UsersIndex extends JsonApiController
list($offset, $limit) = $this->getOffsetAndLimit(); list($offset, $limit) = $this->getOffsetAndLimit();
$partSQL = \GlobalSearchUsers::getSQL($filters['search'], [], $limit + $offset); $partSQL = \GlobalSearchUsers::getSQL($filters['search'], [], $limit + $offset);
$total = (int) \DBManager::get()->fetchColumn('SELECT FOUND_ROWS() as found_rows');
$users = \User::findMany( $users = \User::findMany(
array_map(function ($array) { array_map(function ($array) {
return $array['user_id']; return $array['user_id'];
}, \DBManager::get()->fetchAll($partSQL)) }, \DBManager::get()->fetchAll($partSQL))
); );
$total = (int) \DBManager::get()->fetchColumn('SELECT FOUND_ROWS() as found_rows');
return $this->getPaginatedContentResponse($users, $total); return $this->getPaginatedContentResponse($users, $total);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment