. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Http\RequestHandlers; use Fisharebest\Webtrees\Http\ViewResponseTrait; use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Validator; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\RequestHandlerInterface; /** * List of users. */ class UserListPage implements RequestHandlerInterface { use ViewResponseTrait; /** * @param ServerRequestInterface $request * * @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface { $this->layout = 'layouts/administration'; $user = Validator::attributes($request)->user(); $params = $request->getQueryParams(); $filter = $params['filter'] ?? ''; $page_size = (int) $user->getPreference(' admin_users_page_size', '10'); $title = I18N::translate('User administration'); return $this->viewResponse('admin/users', [ 'filter' => $filter, 'page_size' => $page_size, 'title' => $title, ]); } }