public function __invoke() { $user = $this->userRepository->authenticate($this->username, $this->password); if (false !== $user) { $this->session->set(LoginContext::LOGIN_VAR, $user->id()); $this->redir->redirect(303, '/games'); return; } $this->view->display('home.html', ['msg' => 'Invalid login']); }
public function __invoke() { $this->session->destroy(); $this->redirector->redirect(303, '/'); }
public function __invoke() { // validation goes here $this->userRepository->newUserUnsafe($this->dispname, $this->username, $this->password, $this->phone); $this->redirector->redirect(303, '/'); }
public function __invoke() { $title = $this->request->post('gamename'); $this->gameRepository->createGameUnsafe($title, $this->currentUser); $this->redirector->redirect(303, '/games'); }