Allow site operators to control full name suppression on posts

What do you think of a dirty patch:

Discourse.PosterNameComponent.prototype.sanitizeName = function(name){return name;}

placed in header template? (do I need to bind it to onLoad()?) It looks safe for me, but my forum is in production, and I’m little affraid of blowing it out.

Timing-wise, that belongs in </head>.

But you should write it like this:

  sanitizeName: function(name){return name;}

Somewhat related to this topic. I just noticed that with enable names enabled:

username= Jan_de_Bont, name= Jan de Bont shows the name with the post although it is redundant. Probably even more so than if username = jandebont with name= Jan de Bont.

What is the logic/code for deciding to show the name or not with enable names enabled?


Sounds like a bug to me.

1 Like

I’m going to try this, but it’s really lame because I just went to “fix” someone’s name because it was only showing johndoe - only to find I was wasting my time because their name was set to John Doe as requested.

johndoe ≠ John Doe ≠ john_doe

and the inconsistency is maddening.


Today I faced the problem too: Discourse does not show the Real Name on a topic page then it (wrongly) assumes it is the same as the Username.

And I end up with my own plugin «Real Name»:


Not a bad idea… if the full name and username match, show only full name.

The only trick there is your username mention is @dmitry_fedyuk not @dmitryfedyuk.

1 Like

As I’ve said before, I think we need an additional configuration option.

Since the option to show the full name really means “show the full name only if the software thinks it should be shown”, we need an additional “Yes, I really mean always show the full name” option.


Well, as a user, I resent it when you show me

kensims Ken Sims

That’s not useful to me. However if it gets replaced by

Ken Sims

That’s more defensible as it does not duplicate information. You don’t quite know the correct @username – is it a space? dash? underscore? but that might be OK.

Clicking on their username to get the usercard would make that information known. Plus you could probably deduce quickly that @kensims is who you want for Ken Sims (in theory)

If it shows:

You know the name is "Jen Namack", not "Jenna Mack", which is somewhat useful.

As a user, I resent being a second class citizen with my full name not shown just because of my username.

I for one am awful happy someone came along and fixed this bug faulty design with a plugin. I hope someone will come along and fix this with a free and open source pull request.


I think it is terribly hard to defend showing

“I_Am_User I_Am_User” on every post you ever make, it actually looks like a software bug.

But if people are insisting on messing with their users and making them think stuff is broken, so be it. Maybe someone should submit a PR for a site setting.

I am pretty opposed to this as I think you are inventing a problem here.

1 Like

What if it suppressed it only when it’s an exact match?

Well technically it would be

I_Am_User I Am User

I am not opposed to having full name be the one we pick in that case, e.g. showing only

I Am User

1 Like

I mean when stuff matches 100% with the exact same casing, that particular case is very hard to defend.

Though … I also find “sam Sam” to be pretty annoying.

  1. Without my full name, if you don’t look at my profile, how do you know my full name is actually Ken Sims and not K Ensims?

  2. As a user, I resent it that other users get their full name displayed and I don’t.

  3. As an admin and as a programmer (not Discourse but in my $dayjob for over 35 years), I resent it that the option says “display name on posts” and “Show a user’s full name on their posts in addition to their @username.” but it doesn’t actually do that.


I guess the only solution, from an admin confusion point of view, is to add a new, default-on site setting: “Suppress full names similar to usernames”

1 Like

And with that all bets are off?

“sam sam” allowed


“sam Sam” allowed

It’s quite terrible, I am not writing this pr, but if someone wants to, so be it

1 Like

What if we only did it if there was a space, since the argument seems to be that

jamesbrown James Brown

could be

jamesbrown Jam Esbrown

This would protect you from the sam sam case.