-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogout.php
More file actions
29 lines (21 loc) · 735 Bytes
/
logout.php
File metadata and controls
29 lines (21 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
require_once 'app/init.php';
use LoginScript\{
Session\Session,
Config\Config,
};
$controller = $app->controller('logout');
$controller->setPageItems([
'title' => 'Logout',
'back_link_href' => 'index.php',
'back_link_description' => 'Back to the homepage'
]);
$errors = Session::get(Config::get('errors/session_name'));
Session::delete(Config::get('errors/session_name'));
?>
<?php require_once 'partials/header.php'; ?>
<main>
<?php require_once 'components/back-link.php'; ?>
<?php echo !empty($errors['failed']) ? '<div class="alert alert-danger" role="alert"><p>' . $errors['failed'] . '</p></div>' : '' ?>
</main>
<?php require_once 'partials/footer.php'; ?>