Example #1
0
 public function route($args)
 {
     parent::route($args);
     $msg = $this->userService->processLoginForm($this->request->post());
     if ($msg === false) {
         $this->app->flash('error', 'incorrect username or password');
     }
     $this->app->redirect("/admin");
 }
Example #2
0
 public function route($args)
 {
     parent::route($args);
     $this->userService->processLogoutForm();
     $this->app->redirect($this->request->getRootUri());
 }