Authored by ZhouQiqi

移除登录时的ip限制

... ... @@ -155,10 +155,10 @@ class LoginController extends WebAction
$errLoginTimes = intval(Cache::get($errorLoginKey));
$accountTimes = intval(Cache::get($accountKey));
$ipTimes = intval(Cache::get($ipKey));
if ($ipTimes >= 100) {
$data = array('code' => 400, 'message' => '您尝试的次数过多,账号已被暂时锁定,请稍后再试', 'data' => '');
break;
}
// if ($ipTimes >= 100) {
// $data = array('code' => 400, 'message' => '您尝试的次数过多,账号已被暂时锁定,请稍后再试', 'data' => '');
// break;
// }
if ($accountTimes >= 10) {
$data = array('code' => 400, 'message' => '您的账号已被暂时锁定,请稍后再试', 'data' => '');
break;
... ... @@ -183,10 +183,10 @@ class LoginController extends WebAction
Cache::set($accountKey, $accountTimes, 1800);
Cache::set($ipKey, $ipTimes, 3600);
//再次校验
if ($ipTimes >= 100) {
$data = array('code' => 400, 'message' => '您尝试的次数过多,账号已被暂时锁定,请稍后再试', 'data' => '');
break;
}
// if ($ipTimes >= 100) {
// $data = array('code' => 400, 'message' => '您尝试的次数过多,账号已被暂时锁定,请稍后再试', 'data' => '');
// break;
// }
if ($accountTimes >= 10) {
$data = array('code' => 400, 'message' => '您的账号已被暂时锁定,请稍后再试', 'data' => '');
break;
... ...