FIX: Don't import parts of the email address as name

FIX: Don’t import parts of the email address as name

diff --git a/script/import_scripts/base.rb b/script/import_scripts/base.rb
index 93af4a7..b6bb176 100644
--- a/script/import_scripts/base.rb
+++ b/script/import_scripts/base.rb
@@ -302,8 +302,6 @@ class ImportScripts::Base
     # Allow the || operations to work with empty strings ''
     opts[:username] = nil if opts[:username].blank?
 
-    opts[:name] = User.suggest_name(opts[:email]) unless opts[:name]
-
     if opts[:username].blank? ||
       opts[:username].length < User.username_length.begin ||
       opts[:username].length > User.username_length.end ||

GitHub sha: 8d5dfe1e

This commit has been mentioned on Discourse Meta. There might be relevant details there:

Why not? Did this line cause any issues?

Mostly because it’s a privacy concern. It may leak parts of the email address even though the imported user used only a pseudonym. I think it’s best if we leave it to the actual import scripts to decide if the name should be set or not and which value it should use.

I even considered removing the following line. But I might add a condition to suppress emails from being used as name. I recently had to blank the name column after an import, because many of the old usernames contained email addresses and they showed up as name after the import.

1 Like