Lookup on both, email and login.
This commit is contained in:
parent
33b1696bd1
commit
f5aedbf49b
1 changed files with 4 additions and 1 deletions
|
@ -128,7 +128,10 @@ module Channel::Filter::IdentifySender
|
||||||
def self.user_create(data)
|
def self.user_create(data)
|
||||||
|
|
||||||
# return existing
|
# return existing
|
||||||
user = User.find_by(login: data[:email].downcase)
|
user = User.find_by(email: data[:email].downcase)
|
||||||
|
if !user
|
||||||
|
user = User.find_by(login: data[:email].downcase)
|
||||||
|
end
|
||||||
|
|
||||||
# check if firstname or lastname need to be updated
|
# check if firstname or lastname need to be updated
|
||||||
if user
|
if user
|
||||||
|
|
Loading…
Reference in a new issue