From ba5530418245e85e7516fa653443700a293d3c45 Mon Sep 17 00:00:00 2001 From: pbbfa23ckl Date: Mon, 23 Jun 2025 10:33:53 +0200 Subject: [PATCH] Logout fertig --- Controller/UserController.php | 6 +++++- Views/header.phtml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) 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 @@
-

Notes App (Admin Panel)"; ?>

+

Notes App (Admin Panel)"; ?>