Skip to content
Snippets Groups Projects

fixes #3281

Merged Jan-Hendrik Willms requested to merge biest-3281 into main
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -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);
}
}
Loading