...
|
...
|
@@ -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,15 +222,9 @@ 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));
|
|
|
}
|
|
|
else {
|
|
|
$this->go($refer);
|
|
|
$this->syncUserSession($result['data']['uid']);
|
|
|
}
|
|
|
$this->go($refer);
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -271,15 +256,9 @@ 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));
|
|
|
}
|
|
|
else {
|
|
|
$this->go($refer);
|
|
|
$this->syncUserSession($result['data']['uid']);
|
|
|
}
|
|
|
$this->go($refer);
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|