mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
fallback to email lookup if needed
This commit is contained in:
parent
4f7e960e49
commit
55e5515657
1 changed files with 7 additions and 0 deletions
|
@ -40,6 +40,13 @@ def create_user(opts, import_id)
|
|||
|
||||
u.save!
|
||||
u
|
||||
|
||||
rescue
|
||||
# try based on email
|
||||
u = User.find_by(email: opts[:email].downcase)
|
||||
u.custom_fields["import_id"] = import_id
|
||||
u.save!
|
||||
u
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue