1
0
Fork 0

Fix double login issue

- Removed session existence check in killme
- Changed returned value in session_write for empty data
This commit is contained in:
Hypolite Petovan 2017-12-18 23:39:34 -05:00
parent 7a6706b0f7
commit b6f60c45aa
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;