Fixed syntax error.

This commit is contained in:
Martin Edenhofer 2013-02-13 00:21:56 +01:00
parent acad651fef
commit 5b9ba8611d

View file

@ -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