. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Http\RequestHandlers; use Fisharebest\Webtrees\Http\ViewResponseTrait; use Fisharebest\Webtrees\I18N; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\RequestHandlerInterface; /** * Add a user. */ class UserAddPage implements RequestHandlerInterface { use ViewResponseTrait; /** * @param ServerRequestInterface $request * * @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface { $this->layout = 'layouts/administration'; $params = $request->getQueryParams(); $email = $params['email'] ?? ''; $real_name = $params['real_name'] ?? ''; $username = $params['username'] ?? ''; $title = I18N::translate('Add a user'); return $this->viewResponse('admin/users-create', [ 'email' => $email, 'real_name' => $real_name, 'title' => $title, 'username' => $username, ]); } }