From b424be35c6f9c2ed87cbcd85d79b88ebe89bf4d0 Mon Sep 17 00:00:00 2001 From: saint Date: Sat, 31 Aug 2024 23:22:10 +1000 Subject: [PATCH] v0.58 Final user import and personal message import run --- gossamer_forums.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gossamer_forums.rb b/gossamer_forums.rb index 9766f06..926cd9a 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -629,7 +629,8 @@ class GossamerForumsImporter < ImportScripts::Base email = row['user_email'] # Check if the user already exists in Discourse by username or email - existing_user = User.find_by(username: username) || User.find_by(email: email) + # existing_user = User.find_by(username: username) || User.find_by(email: email) + existing_user = User.find_by(username: username) || User.joins(:user_emails).find_by(user_emails: { email: email }) # Only add the user if they do not already exist unless existing_user