this should do.
This commit is contained in:
parent
57c1650e04
commit
149868c097
|
@ -64,7 +64,7 @@ class User < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.find_first_by_auth_conditions(warden_conditions)
|
def self.find_first_by_auth_conditions(warden_conditions)
|
||||||
conditions = warden_conditions.dup
|
conditions = warden_conditions.dup.to_h
|
||||||
if login = conditions.delete(:login)
|
if login = conditions.delete(:login)
|
||||||
where(conditions).where(["lower(screen_name) = :value OR lower(email) = :value", { :value => login.downcase }]).first
|
where(conditions).where(["lower(screen_name) = :value OR lower(email) = :value", { :value => login.downcase }]).first
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue