module Identity::Mixins::User::ClassMethods

Public Instance Methods

active() click to toggle source
# File lib/identity/mixins/user.rb, line 33
def active
  result = where(active: true)
  result = result.where.not(confirmed_at: nil) if devise_modules.include?(:confirmable)
  result
end
find_first_by_auth_conditions(tainted_conditions, opts = {}) click to toggle source
Calls superclass method
# File lib/identity/mixins/user.rb, line 29
def find_first_by_auth_conditions(tainted_conditions, opts = {})
  super(tainted_conditions, send(Identity.active_scope).where_values_hash.merge(opts))
end
from_omniauth!(auth) click to toggle source
# File lib/identity/mixins/user.rb, line 23
def from_omniauth!(auth)
  where(provider: auth.provider, uid: auth.uid).first_or_create! do |user|
    user.build_from_auth auth
  end
end