...
|
...
|
@@ -302,20 +302,19 @@ class AbstractAction extends Controller_Abstract |
|
|
if (!$this->_uid) {
|
|
|
$cookie = $this->getCookie('_UID');
|
|
|
if (!empty($cookie)) {
|
|
|
$uid = 0;
|
|
|
$cookieList = explode('::', $cookie);
|
|
|
if (isset($cookieList[1]) && is_numeric($cookieList[1])) {
|
|
|
$uid = $cookieList[1];
|
|
|
if ($useSession) {
|
|
|
$token = $this->getSession('_TOKEN');
|
|
|
if ($token === Helpers::makeToken($cookieList[1])) {
|
|
|
$this->_uid = $cookieList[1];
|
|
|
}
|
|
|
} else {
|
|
|
$this->_uid = $cookieList[1];
|
|
|
}
|
|
|
$this->_uname = $cookieList[0];
|
|
|
$this->_vip = $cookieList[2];
|
|
|
}
|
|
|
// 服务端比较
|
|
|
if ($useSession && $uid) {
|
|
|
$token = $this->getSession('_TOKEN');
|
|
|
if ($token === Helpers::makeToken($uid)) {
|
|
|
$this->_uid = $uid;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return $this->_uid;
|
...
|
...
|
|