]> git.wh0rd.org Git - tt-rss.git/commitdiff
logout user: commit destroyed session
authorAndrew Dolgov <noreply@fakecake.org>
Sun, 14 Oct 2018 19:50:45 +0000 (22:50 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Sun, 14 Oct 2018 19:50:45 +0000 (22:50 +0300)
include/functions.php

index be0d4e262151ebdec9b005844ed7ab6ac3e90a8c..d88e96dd600ce75b3f32a6fcbb4d4099cd05ce2d 100755 (executable)
        }
 
        function logout_user() {
-               session_destroy();
+               @session_destroy();
                if (isset($_COOKIE[session_name()])) {
                   setcookie(session_name(), '', time()-42000, '/');
                }
+               session_commit();
        }
 
        function validate_csrf($csrf_token) {
                                }
 
                                if (!$_SESSION["uid"]) {
-                                       @session_destroy();
-                                       setcookie(session_name(), '', time()-42000, '/');
+                                       logout_user();
 
                                        render_login_form();
                                        exit;