|
|
@ -34,6 +34,7 @@ class UserController extends BaseController
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$count = Redis::incr(Redis::KEY_LOGIN_LIMIT);
|
|
|
|
$count = Redis::incr(Redis::KEY_LOGIN_LIMIT);
|
|
|
|
if ($count >= 300) {
|
|
|
|
if ($count >= 300) {
|
|
|
|
|
|
|
|
Log::write('login_limit:' . date('Y-m-d H:i:s') . ' ---- ' . $count, 'INFO', '', C('LOG_PATH')."login_limit.log");
|
|
|
|
Redis::decr(Redis::KEY_LOGIN_LIMIT);
|
|
|
|
Redis::decr(Redis::KEY_LOGIN_LIMIT);
|
|
|
|
$this->set_message(1001, "fail", "登录人数过多,请稍后再试!");
|
|
|
|
$this->set_message(1001, "fail", "登录人数过多,请稍后再试!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|