mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: don't suggest name when email is empty
This commit is contained in:
parent
d38c4d5f74
commit
49996bcdea
@ -171,9 +171,8 @@ class User < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.suggest_name(email)
|
||||
return "" unless email
|
||||
name = email.split(/[@\+]/)[0]
|
||||
name = name.gsub(".", " ")
|
||||
return "" if email.blank?
|
||||
name = email.split(/[@\+]/)[0].gsub(".", " ")
|
||||
name.titleize
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user