From 55e5515657f783d18d0b5e00bb1eab2de4a49a65 Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 18 May 2014 11:49:36 +1000 Subject: [PATCH] fallback to email lookup if needed --- script/import_scripts/bbpress.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/script/import_scripts/bbpress.rb b/script/import_scripts/bbpress.rb index 89e2e4089..7f271b87a 100644 --- a/script/import_scripts/bbpress.rb +++ b/script/import_scripts/bbpress.rb @@ -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