Authored by hf

fixes bug to partner login

... ... @@ -306,6 +306,9 @@ class AbstractAction extends Controller_Abstract
if (isset($cookieList[1]) && is_numeric($cookieList[1])) {
if ($useSession) {
$token = $this->getSession('_TOKEN');
if (empty($token)) {
$token = $this->getCookie('_TOKEN');
}
if ($token === Helpers::makeToken($cookieList[1])) {
$this->_uid = $cookieList[1];
}
... ...
... ... @@ -188,7 +188,7 @@ class LoginController extends AbstractAction
}
if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
$this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid']));
$this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
$this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
} else {
$this->go($refer);
... ... @@ -218,7 +218,7 @@ class LoginController extends AbstractAction
}
if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
$this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid']));
$this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
$this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
} else {
$this->go($refer);
... ... @@ -248,7 +248,7 @@ class LoginController extends AbstractAction
}
if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
$this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid']));
$this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
$this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
} else {
$this->go($refer);
... ...