Lookup on both, email and login.

This commit is contained in:
Martin Edenhofer 2016-09-15 00:52:04 +02:00
parent 33b1696bd1
commit f5aedbf49b

View file

@ -128,7 +128,10 @@ module Channel::Filter::IdentifySender
def self.user_create(data)
# 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
if user