module Hydra::User::ClassMethods

Public Instance Methods

find_by_user_key(key) click to toggle source

This method finds User objects using the user_key as specified by the Devise authentication_keys configuration variable. This method encapsulates whether we use email or username (or something else) as the identifing user attribute.

# File lib/hydra/user.rb, line 21
def find_by_user_key(key)
  find_by(Hydra.config.user_key_field => key)
end