|
|
|
@ -82,7 +82,11 @@ class AccountsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
password_ok = @user.check_password?(params[:password].to_s)
|
|
|
|
|
unless password_ok
|
|
|
|
|
normal_status(-2, "你已经输错密码#{login_control.error_times+1}次,还剩余#{login_control.remain_times-1}次机会")
|
|
|
|
|
if login_control.remain_times-1 == 0
|
|
|
|
|
normal_status(-2, "连续输错密码达到#{login_control.error_times+1}次,账号将被锁定")
|
|
|
|
|
else
|
|
|
|
|
normal_status(-2, "你已经输错密码#{login_control.error_times+1}次,还剩余#{login_control.remain_times-1}次机会")
|
|
|
|
|
end
|
|
|
|
|
login_control.increment!
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|