issue 905, fixed a bug that does not logout when different domain between create autologin cookie and logout

git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@11401 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2012-09-20 09:12:26 +00:00
parent 6da8875d22
commit de98905c12
2 changed files with 11 additions and 5 deletions

View file

@ -2047,6 +2047,10 @@
**/ **/
function destroySessionInfo() { function destroySessionInfo() {
if(!$_SESSION || !is_array($_SESSION)) return; if(!$_SESSION || !is_array($_SESSION)) return;
$memberInfo = Context::get('logged_info');
$memberSrl = $memberInfo->member_srl;
foreach($_SESSION as $key => $val) { foreach($_SESSION as $key => $val) {
$_SESSION[$key] = ''; $_SESSION[$key] = '';
} }
@ -2054,10 +2058,11 @@
setcookie(session_name(), '', time()-42000, '/'); setcookie(session_name(), '', time()-42000, '/');
setcookie('sso','',time()-42000, '/'); setcookie('sso','',time()-42000, '/');
if($_COOKIE['xeak']) { if($memberSrl)
$args->autologin_key = $_COOKIE['xeak']; {
executeQuery('member.deleteAutologin', $args); $args->member_srl = $memberSrl;
} $output = executeQuery('member.deleteAutologin', $args);
}
} }
function _updatePointByGroup($memberSrl, $groupSrlList) function _updatePointByGroup($memberSrl, $groupSrlList)

View file

@ -3,6 +3,7 @@
<table name="member_autologin" /> <table name="member_autologin" />
</tables> </tables>
<conditions> <conditions>
<condition operation="equal" column="autologin_key" var="autologin_key" notnull="notnull" /> <condition operation="equal" column="autologin_key" var="autologin_key" />
<condition operation="equal" column="member_srl" var="member_srl" pipe="or" />
</conditions> </conditions>
</query> </query>