Merge pull request #4107 from MrPetovan/bug/3954-fix-double-login

Fix double login
This commit is contained in:
Michael Vogel 2017-12-19 08:01:05 +01:00 committed by GitHub
commit 1f78868d6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View file

@ -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();

View 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;