From: Andrew Dolgov Date: Sun, 14 Oct 2018 19:50:45 +0000 (+0300) Subject: logout user: commit destroyed session X-Git-Tag: 18.12~63 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ec5687a62b706f3ee91eb21aaeea278fcaa994bc;p=tt-rss.git logout user: commit destroyed session --- diff --git a/include/functions.php b/include/functions.php index be0d4e26..d88e96dd 100755 --- a/include/functions.php +++ b/include/functions.php @@ -811,10 +811,11 @@ } function logout_user() { - session_destroy(); + @session_destroy(); if (isset($_COOKIE[session_name()])) { setcookie(session_name(), '', time()-42000, '/'); } + session_commit(); } function validate_csrf($csrf_token) { @@ -856,8 +857,7 @@ } if (!$_SESSION["uid"]) { - @session_destroy(); - setcookie(session_name(), '', time()-42000, '/'); + logout_user(); render_login_form(); exit;