}
if ($level == 'forgetuid' || $level == 'forgetall') {
- setcookie('ORGuid', '', time() - 3600, '/', '', 0);
- Cookie::kill('ORGuid');
- setcookie('ORGdomain', '', time() - 3600, '/', '', 0);
- Cookie::kill('ORGdomain');
+ Platal::session()->killLoginFormCookies();
}
- S::logger()->log('deconnexion', @$_SERVER['HTTP_REFERER']);
- Platal::session()->destroy();
+ if (S::logged()) {
- $ref = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
- S::logger()->log('deconnexion', $ref);
++ S::logger()->log('deconnexion', @$_SERVER['HTTP_REFERER']);
++ Platal::session()->destroy();
+ }
- Platal::session()->destroy();
if (Get::has('redirect')) {
http_redirect(rawurldecode(Get::v('redirect')));