]> git.mxchange.org Git - friendica.git/commitdiff
Fix double login issue
authorHypolite Petovan <mrpetovan@gmail.com>
Tue, 19 Dec 2017 04:39:34 +0000 (23:39 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Tue, 19 Dec 2017 04:43:15 +0000 (23:43 -0500)
- Removed session existence check in killme
- Changed returned value in session_write for empty data

boot.php
include/session.php

index 00058727f50142907da991b1698caae48e209286..0dd8e03f254bbb96a02c1422509987c256a5b16a 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -928,14 +928,8 @@ function login($register = false, $hiddens = false)
  */
 function killme()
 {
-       global $session_exists;
-
        if (!get_app()->is_backend()) {
-               if (!$session_exists) {
-                       session_abort();
-               } else {
-                       session_write_close();
-               }
+               session_write_close();
        }
 
        exit();
index 54c17e3754ed6a04ada656c92b0a1a0c93bf1271..66df498fe076d11d54bf86783d547c5aeaccb5db 100644 (file)
@@ -61,10 +61,14 @@ function ref_session_write($id, $data)
 {
        global $session_exists, $session_expire;
 
-       if (!$id || !$data) {
+       if (!$id) {
                return false;
        }
 
+       if (!$data) {
+               return true;
+       }
+
        $expire = time() + $session_expire;
        $default_expire = time() + 300;