mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Hook should be on lockable not recoverable and removed an useless comment
This commit is contained in:
parent
ca73dae1f0
commit
e6af9763fd
3 changed files with 2 additions and 3 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
require "devise/hooks/lockable"
|
||||||
|
|
||||||
module Devise
|
module Devise
|
||||||
module Models
|
module Models
|
||||||
# Handles blocking a user access after a certain number of attempts.
|
# Handles blocking a user access after a certain number of attempts.
|
||||||
|
@ -88,7 +90,6 @@ module Devise
|
||||||
# if the user can login or not (wrong password, etc)
|
# if the user can login or not (wrong password, etc)
|
||||||
unlock_access! if lock_expired?
|
unlock_access! if lock_expired?
|
||||||
|
|
||||||
# As failed_attempts is always 0 after sign_in, there is no need to set it to 0
|
|
||||||
if super && !access_locked?
|
if super && !access_locked?
|
||||||
true
|
true
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
require "devise/hooks/recoverable"
|
|
||||||
|
|
||||||
module Devise
|
module Devise
|
||||||
module Models
|
module Models
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue