diff --git a/public/confirm_logout.php b/public/confirm_logout.php index b6f2f01..d81ea80 100644 --- a/public/confirm_logout.php +++ b/public/confirm_logout.php @@ -1,6 +1,11 @@ user->loggedIn) +{ + $app->redirect('index.php'); +} + $app->view('template/header', ["title" => "Bekreft avlogging"]); $app->view('confirm_logout'); $app->view('template/footer'); \ No newline at end of file diff --git a/public/logout.php b/public/logout.php index 41f8a83..94b8bca 100644 --- a/public/logout.php +++ b/public/logout.php @@ -1,6 +1,11 @@ user->loggedIn) +{ + $app->redirect('login.php'); +} + $app->session->clear(); $app->session->flash('Du har blitt logget av'); $app->redirect("login.php"); \ No newline at end of file