|
|
@ -78,7 +78,7 @@ class AccountsController < ApplicationController
|
|
|
|
return normal_status(-2, "违反平台使用规范,账号已被锁定") if @user.locked?
|
|
|
|
return normal_status(-2, "违反平台使用规范,账号已被锁定") if @user.locked?
|
|
|
|
|
|
|
|
|
|
|
|
login_control = LimitForbidControl::UserLogin.new(@user)
|
|
|
|
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)
|
|
|
|
password_ok = @user.check_password?(params[:password].to_s)
|
|
|
|
unless password_ok
|
|
|
|
unless password_ok
|
|
|
|