From: Hypolite Petovan Date: Tue, 19 Dec 2017 04:39:34 +0000 (-0500) Subject: Fix double login issue X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b6f60c45aa209c40bc894f51a33a49cabad1ddbc;p=friendica.git Fix double login issue - Removed session existence check in killme - Changed returned value in session_write for empty data --- diff --git a/boot.php b/boot.php index 00058727f5..0dd8e03f25 100644 --- 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(); diff --git a/include/session.php b/include/session.php index 54c17e3754..66df498fe0 100644 --- a/include/session.php +++ b/include/session.php @@ -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;