Module: Sorcery::Model::Submodules::ResetPassword::ClassMethods

Defined in:
lib/sorcery/model/submodules/reset_password.rb

Instance Method Summary collapse

Instance Method Details

#load_from_reset_password_token(token, &block) ⇒ Object

Find user by token, also checks for expiration. Returns the user if token found and is valid.



62
63
64
65
66
67
68
69
# File 'lib/sorcery/model/submodules/reset_password.rb', line 62

def load_from_reset_password_token(token, &block)
  load_from_token(
    token,
    @sorcery_config.reset_password_token_attribute_name,
    @sorcery_config.reset_password_token_expires_at_attribute_name,
    &block
  )
end