This commit is contained in:
aozhiwei 2022-05-31 12:37:02 +08:00
parent c45083c473
commit 3c0f6ec8e7

View File

@ -43,19 +43,7 @@ class BaseAuthedController extends BaseController {
$_REQUEST
));
phpcommon\sendError(1001, 'session expiration');
}
}
if (!(getReqVal('c', '') == 'User' && getReqVal('c', '') == 'login')) {
$r = $this->_getRedis($this->_getAccountId());
$sessionId = $r->get(LAST_SESSION_KEY . $this->_getAccountId());
if (empty($sessionId)) {
$this->updateSession(myself()->_getAccountId(),
myself()->_getSessionId());
} else if ($sessionId != $this->_getSessionId()) {
error_log('session expiration' . json_encode(
$_REQUEST
));
phpcommon\sendError(1001, 'session expiration');
die();
}
}
}