mirror of
https://github.com/discourse/discourse.git
synced 2025-04-17 12:59:07 +08:00
fallback to email lookup if needed
This commit is contained in:
parent
4f7e960e49
commit
55e5515657
@ -40,6 +40,13 @@ def create_user(opts, import_id)
|
|||||||
|
|
||||||
u.save!
|
u.save!
|
||||||
u
|
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
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user