module Devise::Models::Authenticatable::ClassMethods
def find_for_authentication(tainted_conditions)
an e-mail for password reset. In such cases, find_for_authentication
besides authentication, for example when retrieving a user to send
Finally, notice that Devise also queries for users in other scenarios
end
find_first_by_auth_conditions(tainted_conditions, active: true)
def self.find_for_authentication(tainted_conditions)
Example:
namedscope to filter records while authenticating.
Overwrite to add customized conditions, create a join, or maybe use a
or the whole authenticate stack by customize `find_for_authentication.`
this method. This allows you to customize both database authenticatable
provides a `find_for_database_authentication` that wraps a call to
it may be wrapped as well. For instance, database authenticatable
This method is always called during an authentication process but
Find first record based on conditions given (ie by the sign in form).
def find_for_authentication(tainted_conditions) find_first_by_auth_conditions(tainted_conditions) end