2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-07 12:02:53 +08:00

FEATURE: phase 1 of supporting multiple email addresses

This commit is contained in:
Leo McArdle 2017-04-26 19:47:36 +01:00 committed by Guo Xiang Tan
parent 739794f0cb
commit d0b027d88d
35 changed files with 337 additions and 80 deletions

View file

@ -324,7 +324,7 @@ class ImportScripts::Base
rescue => e
# try based on email
if e.try(:record).try(:errors).try(:messages).try(:[], :email).present?
if existing = User.find_by(email: opts[:email].downcase)
if existing = User.find_by_email(opts[:email].downcase)
existing.custom_fields["import_id"] = import_id
existing.save!
u = existing