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:
parent
739794f0cb
commit
d0b027d88d
35 changed files with 337 additions and 80 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue