2022-09-13 13:14:49 +00:00
|
|
|
<?php
|
|
|
|
namespace Misuzu;
|
|
|
|
|
2023-08-02 22:12:47 +00:00
|
|
|
if(!$msz->isLoggedIn()) {
|
2022-09-13 13:14:49 +00:00
|
|
|
url_redirect('index');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(CSRF::validateRequest()) {
|
2023-07-28 20:06:12 +00:00
|
|
|
$msz->getSessions()->deleteSessions(sessionTokens: $authToken->getSessionToken());
|
2023-05-21 18:15:04 +00:00
|
|
|
AuthToken::nukeCookie();
|
2022-09-13 13:14:49 +00:00
|
|
|
url_redirect('index');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
Template::render('auth.logout');
|