Merge pull request #4107 from MrPetovan/bug/3954-fix-double-login
Fix double login
This commit is contained in:
commit
1f78868d6d
8
boot.php
8
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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue