diff --git a/Controller/UserController.php b/Controller/UserController.php index 9d933a8..0ff5a1e 100644 --- a/Controller/UserController.php +++ b/Controller/UserController.php @@ -22,7 +22,9 @@ class UserController $erg = array(); $erg = $this->userModel->verifyLogin($_POST["username"], $_POST["password"]); if ($erg["success"] == true) { - + header("Location: ?controller=Welcome&do=showWelcome"); + exit(); + } else { $this->view->setDoMethodName("showUserLoginForm"); @@ -37,6 +39,8 @@ class UserController public function logoutUser() { $this->userModel->logoutUser(); + header("Location: ?controller=Welcome&do=showWelcome"); + exit(); } diff --git a/Views/header.phtml b/Views/header.phtml index 07ff82f..d5593ba 100644 --- a/Views/header.phtml +++ b/Views/header.phtml @@ -9,7 +9,7 @@