diff --git a/app/controllers/auth/passwords_controller.rb b/app/controllers/auth/passwords_controller.rb index a990325f9..9a281df16 100644 --- a/app/controllers/auth/passwords_controller.rb +++ b/app/controllers/auth/passwords_controller.rb @@ -35,7 +35,7 @@ class Auth::PasswordsController < Devise::PasswordsController yield resource if block_given? if resource.errors.empty? - resource.unlock_access! if unlockable?(resource) + resource.unlock_access! if resource.respond_to?(:unlock_access!) if Devise.sign_in_after_reset_password set_flash_message!(:notice, password_update_flash_message) resource.after_database_authentication diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 7097521a2..df5f61df2 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -205,7 +205,7 @@ Devise.setup do |config| # :time = Re-enables login after a certain amount of time (see :unlock_in below) # :both = Enables both strategies # :none = No unlock strategy. You should handle unlocking by yourself. - config.unlock_strategy = :both + config.unlock_strategy = :time # Number of authentication tries before locking an account if lock_strategy # is failed attempts.