From ec5687a62b706f3ee91eb21aaeea278fcaa994bc Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 14 Oct 2018 22:50:45 +0300 Subject: [PATCH] logout user: commit destroyed session --- include/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.39.5