This repository has been archived on 2023-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
web/public/logout.php

21 lines
444 B
PHP
Raw Normal View History

2022-01-23 21:56:36 +00:00
<?php
$app = require '../app/inc.php';
2022-04-14 20:59:42 +00:00
if (!$app->user->logged_in)
2022-01-25 16:31:11 +00:00
{
$app->redirect('login.php');
}
2022-04-13 19:22:21 +00:00
$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();
}
2022-01-26 19:28:00 +00:00
$app->user->logout();
2022-01-23 21:56:36 +00:00
$app->session->flash('Du har blitt logget av');
2022-01-24 12:31:37 +00:00
$app->redirect("login.php");