misuzu/public/auth/logout.php

17 lines
322 B
PHP
Raw Normal View History

2019-03-08 01:35:53 +01:00
<?php
require_once '../../misuzu.php';
2019-06-10 17:21:53 +02:00
if(!user_session_active()) {
url_redirect('index');
2019-03-08 01:35:53 +01:00
return;
}
2019-06-10 17:24:22 +02:00
if(csrf_verify_request()) {
2019-08-14 21:44:30 +02:00
setcookie('msz_auth', '', -9001, '/', '', !empty($_SERVER['HTTPS']), true);
2019-03-08 01:35:53 +01:00
user_session_stop(true);
url_redirect('index');
2019-03-08 01:35:53 +01:00
return;
}
echo tpl_render('auth.logout');