1
This commit is contained in:
parent
d1281dd941
commit
fbfd7a67b4
@ -18,9 +18,6 @@ class BaseAuthedController extends BaseController {
|
|||||||
{
|
{
|
||||||
$this->accountId = $_REQUEST['account_id'];
|
$this->accountId = $_REQUEST['account_id'];
|
||||||
$this->sessionId = $_REQUEST['session_id'];
|
$this->sessionId = $_REQUEST['session_id'];
|
||||||
if ($_REQUEST['c'] == 'Role' && $_REQUEST['a'] == 'battleReport') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!phpcommon\isValidSessionId($this->accountId,
|
if (!phpcommon\isValidSessionId($this->accountId,
|
||||||
$this->sessionId)) {
|
$this->sessionId)) {
|
||||||
phpcommon\sendError(500, '无效的session_id');
|
phpcommon\sendError(500, '无效的session_id');
|
||||||
@ -335,4 +332,15 @@ class BaseAuthedController extends BaseController {
|
|||||||
DynData::decV($x, $y, $decVal);
|
DynData::decV($x, $y, $decVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function _checkSeason($userInfo, $initRankMeta, $currSeasonMeta)
|
||||||
|
{
|
||||||
|
#$rankMeta = mt\Rank::get(1);
|
||||||
|
if ($initRankMeta && $userInfo['rank'] < $initRankMeta['rank']) {
|
||||||
|
$this->_updateUserInfo(array(
|
||||||
|
'rank' => $initRankMeta['rank'],
|
||||||
|
'score' => $initRrankMeta['min_score'],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,12 +43,8 @@ class UserController extends BaseAuthedController {
|
|||||||
|
|
||||||
private function loginCheck($userInfo)
|
private function loginCheck($userInfo)
|
||||||
{
|
{
|
||||||
$rankMeta = mt\Rank::get(1);
|
if (!$this->_checkSeason()) {
|
||||||
if ($rankMeta && $userInfo['rank'] < $rankMeta['rank']) {
|
return false;
|
||||||
$this->updateUserInfo(array(
|
|
||||||
'rank' => $rankMeta['rank'],
|
|
||||||
'score' => $rankMeta['min_score'],
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user