...
|
...
|
@@ -91,11 +91,6 @@ class LoginController extends AbstractAction |
|
|
$this->setCookie('_SPK', '');
|
|
|
|
|
|
$refer = $this->server('HTTP_REFERER', SITE_MAIN);
|
|
|
$token = $this->get('token');
|
|
|
if (!empty($token)) {
|
|
|
$this->go(Helpers::logoutSession($token, $refer));
|
|
|
}
|
|
|
|
|
|
$this->go($refer);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -155,13 +150,9 @@ class LoginController extends AbstractAction |
|
|
else {
|
|
|
$refer = rawurldecode($refer);
|
|
|
}
|
|
|
$data['data']['session'] = Helpers::syncUserSession($data['data']['uid']);
|
|
|
$this->syncUserSession($data['data']['uid']);
|
|
|
$data['data']['session'] = $refer;
|
|
|
$data['data']['href'] = $refer;
|
|
|
|
|
|
$token = Helpers::makeToken($data['data']['uid']);
|
|
|
$this->setCookie('_TOKEN', $token);
|
|
|
$this->setSession('_TOKEN', $token);
|
|
|
$this->setSession('_LOGIN_UID', $data['data']['uid']);
|
|
|
}
|
|
|
while (false);
|
|
|
|
...
|
...
|
@@ -231,16 +222,10 @@ class LoginController extends AbstractAction |
|
|
}
|
|
|
|
|
|
if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
|
|
|
$token = Helpers::makeToken($result['data']['uid']);
|
|
|
$this->setSession('_TOKEN', $token);
|
|
|
$this->setSession('_LOGIN_UID', $result['data']['uid']);
|
|
|
$this->setCookie('_TOKEN', $token);
|
|
|
$this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
|
|
|
$this->syncUserSession($result['data']['uid']);
|
|
|
}
|
|
|
else {
|
|
|
$this->go($refer);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* QQ账号登录:回调方法
|
...
|
...
|
@@ -271,16 +256,10 @@ class LoginController extends AbstractAction |
|
|
}
|
|
|
|
|
|
if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
|
|
|
$token = Helpers::makeToken($result['data']['uid']);
|
|
|
$this->setSession('_TOKEN', $token);
|
|
|
$this->setSession('_LOGIN_UID', $result['data']['uid']);
|
|
|
$this->setCookie('_TOKEN', $token);
|
|
|
$this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
|
|
|
$this->syncUserSession($result['data']['uid']);
|
|
|
}
|
|
|
else {
|
|
|
$this->go($refer);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 新浪微博账号登录:回调方法
|
...
|
...
|
|