FIX: in import scripts, don't generate names for users based on their emails. It's basically the same as publicizing their emails.

This commit is contained in:
Neil Lalonde 2014-06-05 14:15:32 -04:00
parent 7bb33c28c2
commit 2f706d084f
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ class ImportScripts::Base
existing = User.where(email: opts[:email].downcase, username: opts[:username]).first
return existing if existing and existing.custom_fields["import_id"].to_i == import_id.to_i
opts[:name] = User.suggest_name(opts[:name] || opts[:email])
opts[:name] = User.suggest_name(opts[:name]) if opts[:name]
opts[:username] = UserNameSuggester.suggest((opts[:username].present? ? opts[:username] : nil) || opts[:name] || opts[:email])
opts[:email] = opts[:email].downcase
opts[:trust_level] = TrustLevel.levels[:basic] unless opts[:trust_level]