mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
Fix logout bug in admin module
This commit is contained in:
parent
1e532c51a4
commit
31623842ba
2 changed files with 34 additions and 16 deletions
|
|
@ -457,15 +457,38 @@ class Session
|
||||||
*/
|
*/
|
||||||
public static function destroy()
|
public static function destroy()
|
||||||
{
|
{
|
||||||
|
// Get session parameters.
|
||||||
|
list($lifetime, $refresh_interval, $domain, $path) = self::_getParams();
|
||||||
|
|
||||||
|
// Delete all cookies.
|
||||||
|
self::_setKeys();
|
||||||
|
self::destroyAutologinKeys();
|
||||||
|
setcookie(session_name(), 'deleted', time() - 86400, $path, $domain, false, false);
|
||||||
|
setcookie('xe_logged', 'deleted', time() - 86400, $path, $domain, false, false);
|
||||||
|
setcookie('xeak', 'deleted', time() - 86400, $path, $domain, false, false);
|
||||||
|
setcookie('sso', 'deleted', time() - 86400, $path, $domain, false, false);
|
||||||
|
unset($_COOKIE[session_name()]);
|
||||||
|
unset($_COOKIE['rx_autologin']);
|
||||||
|
unset($_COOKIE['rx_sesskey1']);
|
||||||
|
unset($_COOKIE['rx_sesskey2']);
|
||||||
|
unset($_COOKIE['xe_logged']);
|
||||||
|
unset($_COOKIE['xeak']);
|
||||||
|
unset($_COOKIE['sso']);
|
||||||
|
|
||||||
|
// Clear session data.
|
||||||
$_SESSION = array();
|
$_SESSION = array();
|
||||||
|
|
||||||
|
// Close and delete the session.
|
||||||
|
@session_write_close();
|
||||||
|
$result = @session_destroy();
|
||||||
|
|
||||||
|
// Clear local state.
|
||||||
self::$_started = false;
|
self::$_started = false;
|
||||||
self::$_autologin_key = false;
|
self::$_autologin_key = false;
|
||||||
self::$_member_info = false;
|
self::$_member_info = false;
|
||||||
self::_setKeys();
|
$_SESSION = array();
|
||||||
self::destroyAutologinKeys();
|
|
||||||
@session_write_close();
|
return $result;
|
||||||
@session_destroy();
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -951,6 +974,10 @@ class Session
|
||||||
*/
|
*/
|
||||||
public static function destroyAutologinKeys()
|
public static function destroyAutologinKeys()
|
||||||
{
|
{
|
||||||
|
// Get session parameters.
|
||||||
|
list($lifetime, $refresh_interval, $domain, $path) = self::_getParams();
|
||||||
|
|
||||||
|
// Delete the autologin keys from the database.
|
||||||
if (self::$_autologin_key)
|
if (self::$_autologin_key)
|
||||||
{
|
{
|
||||||
executeQuery('member.deleteAutologin', (object)array('autologin_key' => substr(self::$_autologin_key, 0, 24)));
|
executeQuery('member.deleteAutologin', (object)array('autologin_key' => substr(self::$_autologin_key, 0, 24)));
|
||||||
|
|
@ -962,7 +989,8 @@ class Session
|
||||||
$result = false;
|
$result = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
setcookie('rx_autologin', 'deleted', time() - 86400, $path, $domain, false, true);
|
// Delete the autologin cookie.
|
||||||
|
setcookie('rx_autologin', 'deleted', time() - 86400, $path, $domain, false, false);
|
||||||
unset($_COOKIE['rx_autologin']);
|
unset($_COOKIE['rx_autologin']);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,6 @@ class memberController extends member
|
||||||
|
|
||||||
// Destroy session information
|
// Destroy session information
|
||||||
Rhymix\Framework\Session::logout();
|
Rhymix\Framework\Session::logout();
|
||||||
$this->destroySessionInfo();
|
|
||||||
$this->_clearMemberCache($logged_info->member_srl);
|
$this->_clearMemberCache($logged_info->member_srl);
|
||||||
|
|
||||||
// Call a trigger after log-out (after)
|
// Call a trigger after log-out (after)
|
||||||
|
|
@ -2650,16 +2649,7 @@ class memberController extends member
|
||||||
*/
|
*/
|
||||||
function destroySessionInfo()
|
function destroySessionInfo()
|
||||||
{
|
{
|
||||||
if (!Rhymix\Framework\Session::isStarted())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Rhymix\Framework\Session::destroy();
|
Rhymix\Framework\Session::destroy();
|
||||||
setcookie(session_name(), '', $_SERVER['REQUEST_TIME']-42000, '/');
|
|
||||||
setcookie('sso','',$_SERVER['REQUEST_TIME']-42000, '/');
|
|
||||||
setcookie('xeak','',$_SERVER['REQUEST_TIME']-42000, '/');
|
|
||||||
setcookie('xe_logged', 'false', $_SERVER['REQUEST_TIME'] - 42000, '/');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function _updatePointByGroup($memberSrl, $groupSrlList)
|
function _updatePointByGroup($memberSrl, $groupSrlList)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue