misuzu/public/auth/logout.php

17 lines
301 B
PHP
Raw Normal View History

2019-03-08 00:35:53 +00:00
<?php
require_once '../../misuzu.php';
2019-06-10 15:21:53 +00:00
if(!user_session_active()) {
url_redirect('index');
2019-03-08 00:35:53 +00:00
return;
}
2019-06-10 15:24:22 +00:00
if(csrf_verify_request()) {
2019-03-08 00:35:53 +00:00
setcookie('msz_auth', '', -9001, '/', '', true, true);
user_session_stop(true);
url_redirect('index');
2019-03-08 00:35:53 +00:00
return;
}
echo tpl_render('auth.logout');