Fix double login issue
- Removed session existence check in killme - Changed returned value in session_write for empty data
This commit is contained in:
parent
7a6706b0f7
commit
b6f60c45aa
6
boot.php
6
boot.php
|
@ -928,15 +928,9 @@ 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();
|
||||
}
|
||||
}
|
||||
|
||||
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