function guest($url, $status = 302)
 {
     $this->validate();
     $this->session->setPreviousUrl($this->request->getUri());
     $url = $this->normalizeUrl($url);
     return $this->responseFactory->make($status, '', '', ['Location' => $url]);
 }
 protected function viewModel(ViewModel $viewModel)
 {
     $user = $viewModel->user = $this->user;
     $mySelf = $this->session->user();
     $isDev = $mySelf->roleField() == UserInterface::USER_ROLE_DEVELOPER;
     $isAdmin = $mySelf->roleField() == UserInterface::USER_ROLE_ADMIN;
     // Are we editing the logged-in user?
     $isSelf = $user->idField() == $mySelf->idField();
     if ($isSelf) {
         $this->session->setPreviousUrl($this->request->getHeaderLine('Referer'));
     }
     $viewModel->role = ['dev' => UserInterface::USER_ROLE_DEVELOPER, 'admin' => UserInterface::USER_ROLE_ADMIN, 'standard' => UserInterface::USER_ROLE_STANDARD, 'guest' => UserInterface::USER_ROLE_GUEST];
     $viewModel->show = ['roles' => $isDev || $isAdmin && $this->adminSettings->allowEditRole(), 'active' => !$isSelf && $this->adminSettings->enableUsersDisabling()];
     $viewModel->canDelete = $user->exists && ($isDev || !$isSelf || $this->adminSettings->allowDeleteSelf()) ?: null;
     $viewModel->canRename = $this->adminSettings->allowRename();
 }