diff --git a/gossamer_forums.rb b/gossamer_forums.rb index f159761..53a5b2f 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1,5 +1,5 @@ # gossamer threads migration-import code -# v0.15 +# v0.15.1 require 'mysql2' require 'open-uri' @@ -137,7 +137,7 @@ class GossamerForumsImporter < ImportScripts::Base # Sanitize the username to meet Discourse's requirements def sanitize_username(original_username, email, real_name) # original_username = username - sanitized_username = username.gsub(/[^a-zA-Z0-9._-]/, '_') + sanitized_username = original_username.gsub(/[^a-zA-Z0-9._-]/, '_') sanitized_username = "#{sanitized_username}." if sanitized_username.length < 2 # Allow two-character usernames sanitized_username = sanitized_username[0, 20] if sanitized_username.length > 20 firststep_sanitized = sanitized_username