mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 03:09:43 +00:00
normalize_name
is a better name for this.
This commit is contained in:
parent
a5804d7040
commit
2562b61448
@ -54,7 +54,7 @@ module UserNotificationsHelper
|
|||||||
raw format_for_email(html)
|
raw format_for_email(html)
|
||||||
end
|
end
|
||||||
|
|
||||||
def sanitized_name(name)
|
def normalize_name(name)
|
||||||
name.downcase.gsub(/[\s_-]/, '')
|
name.downcase.gsub(/[\s_-]/, '')
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ module UserNotificationsHelper
|
|||||||
SiteSetting.enable_names? &&
|
SiteSetting.enable_names? &&
|
||||||
SiteSetting.display_name_on_posts? &&
|
SiteSetting.display_name_on_posts? &&
|
||||||
post.user.name.present? &&
|
post.user.name.present? &&
|
||||||
sanitized_name(post.user.name) != sanitized_name(post.user.username)
|
normalize_name(post.user.name) != normalize_name(post.user.username)
|
||||||
end
|
end
|
||||||
|
|
||||||
def format_for_email(html)
|
def format_for_email(html)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user