Fixed syntax error.
This commit is contained in:
parent
acad651fef
commit
5b9ba8611d
1 changed files with 7 additions and 5 deletions
|
@ -82,19 +82,21 @@ class User < ApplicationModel
|
|||
if user_auth
|
||||
|
||||
# remember last login date
|
||||
user.update_last_login
|
||||
user_auth.update_last_login
|
||||
|
||||
# reset login failed
|
||||
user.login_failed = 0
|
||||
user.save
|
||||
user_auth.login_failed = 0
|
||||
user_auth.save
|
||||
|
||||
return user_auth
|
||||
end
|
||||
}
|
||||
|
||||
# set login failed +1
|
||||
if !user_auth && user
|
||||
user.login_failed = user.login_failed + 1
|
||||
user.save
|
||||
end
|
||||
|
||||
# auth failed
|
||||
sleep 1
|
||||
|
|
Loading…
Reference in a new issue