Method: Devise::Models::Recoverable::ClassMethods#with_reset_password_token

Defined in:
lib/devise/models/recoverable.rb

#with_reset_password_token(token) ⇒ Object

Attempt to find a user by password reset token. If a user is found, return it If a user is not found, return nil



114
115
116
117
# File 'lib/devise/models/recoverable.rb', line 114

def with_reset_password_token(token)
  reset_password_token = Devise.token_generator.digest(self, :reset_password_token, token)
  to_adapter.find_first(reset_password_token: reset_password_token)
end