32 lines
650 B
PHP
32 lines
650 B
PHP
<?php
|
|
|
|
/**
|
|
* vpanel-stack
|
|
* https://git.stack-source.com/msb/vpanel-stack
|
|
* Copyright (c) 2022 Matthew Saunders Brown <matthewsaundersbrown@gmail.com>
|
|
* GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
*/
|
|
|
|
namespace Panel;
|
|
|
|
class Logout extends \Panel {
|
|
|
|
function beforeRoute($f3) {
|
|
|
|
parent::beforeRoute($f3);
|
|
|
|
}
|
|
|
|
static function get($f3) {
|
|
|
|
$f3->clear('SESSION.expiration');
|
|
$messages[] = "You have been logged out. Please re-enter info to log back in.";
|
|
$f3->set('SESSION.messages', $messages);
|
|
if ($f3->get('PATH') != '/Login') {
|
|
$f3->reroute('/Login');
|
|
}
|
|
|
|
}
|
|
|
|
}
|