Added reset of login_failed if token access was valid.
This commit is contained in:
parent
c95cb1e50e
commit
6d65d96276
1 changed files with 6 additions and 0 deletions
|
@ -235,6 +235,12 @@ class User < ApplicationModel
|
|||
# check token
|
||||
def self.password_reset_check(token)
|
||||
user = Token.check( :action => 'PasswordReset', :name => token )
|
||||
|
||||
# reset login failed if token is valid
|
||||
if user
|
||||
user.login_failed = 0
|
||||
user.save
|
||||
end
|
||||
return user
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue