module Devise::Models::DatabaseAuthenticatable::ClassMethods
def authenticate(attributes={})
Authenticate a user based on configured attribute keys. Returns the
def authenticate(attributes={}) return unless authentication_keys.all? { |k| attributes[k].present? } conditions = attributes.slice(*authentication_keys) resource = find_for_authentication(conditions) resource if resource.try(:valid_for_authentication?, attributes) end