锁定时间

issues25489
daiao 5 years ago
parent f4d44552b4
commit 275f53ab50

@ -78,7 +78,7 @@ class AccountsController < ApplicationController
return normal_status(-2, "违反平台使用规范,账号已被锁定") if @user.locked?
login_control = LimitForbidControl::UserLogin.new(@user)
return normal_status(-2, "登录密码出错已达上限,将锁定密码1小时") if login_control.forbid?
return normal_status(-2, "登录密码出错已达上限,将锁定密码#{login_control.forbid_expires}分钟") if login_control.forbid?
password_ok = @user.check_password?(params[:password].to_s)
unless password_ok

@ -12,7 +12,7 @@ class LimitForbidControl::UserLogin < LimitForbidControl::Base
def forbid_expires
num = EduSetting.get('daily_error_password_forbid_time').presence.to_i
num.zero? ? 1.hours : num.to_i.hours
num.zero? ? 1.hours : num.to_i.minutes
end
def cumulative_expires

Loading…
Cancel
Save