Compare commits

..

No commits in common. "c9f55a0e8784dc0adea516d3ba52f2ea5dd20a76" and "1ce4a94a675faeb3664b4ecc3445d9832781765e" have entirely different histories.

View File

@ -1,5 +1,5 @@
# gossamer threads migration-import code
# v0.15.3
# v0.15.1
require 'mysql2'
require 'open-uri'
@ -312,15 +312,14 @@ class GossamerForumsImporter < ImportScripts::Base
end
# For each user, add user ID mapping to SQLite now that we know what the Discourse user ID is, ... and append user bio and import user files
users.each do |user|
users.each do |discourse_user|
# discourse_username = sanitize_username(user[:username], user[:email], user[:name])
discourse_username = user[:username]
discourse_user = User.find_by(username: discourse_username)
# discourse_user = User.find_by(username: discourse_username)
if discourse_user.nil?
puts "User #{user[:username]} --> #{discourse_username} not found in Discourse. Skipping file import."
next
end
# if discourse_user.nil?
# puts "User #{user[:username]} --> #{discourse_username} not found in Discourse. Skipping file import."
# next
# end
# # Store the user ID mapping
# @user_id_map[user[:id]] = discourse_user.id