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
|
if user_auth
|
||||||
|
|
||||||
# remember last login date
|
# remember last login date
|
||||||
user.update_last_login
|
user_auth.update_last_login
|
||||||
|
|
||||||
# reset login failed
|
# reset login failed
|
||||||
user.login_failed = 0
|
user_auth.login_failed = 0
|
||||||
user.save
|
user_auth.save
|
||||||
|
|
||||||
return user_auth
|
return user_auth
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
# set login failed +1
|
# set login failed +1
|
||||||
|
if !user_auth && user
|
||||||
user.login_failed = user.login_failed + 1
|
user.login_failed = user.login_failed + 1
|
||||||
user.save
|
user.save
|
||||||
|
end
|
||||||
|
|
||||||
# auth failed
|
# auth failed
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
Loading…
Reference in a new issue