user->logged_in) { $app->redirect('login.php'); } $confirm = filter_input(INPUT_GET, 'confirm', FILTER_VALIDATE_BOOLEAN); if (!$confirm) { $app->view('template/header', ["title" => "Bekreft avlogging"]); $app->view('pages/logout'); $app->view('template/footer'); die(); } $app->user->logout(); $app->session->flash('Du har blitt logget av'); $app->redirect("login.php");