Display real name instead of username in a quote?

I have a client that has stupid usernames supplied by SSO (e.g., “Bob Smith” might be joe34122). He would like instead to display the users’ real names. What he’s doing now is when he quotes someone, manually change

[quote="username, post:4, topic:xxxx"]


[quote="Real Name, post:4, topic:xxxx"]

This offends me on a number of levels. Is there some CSS magic that could have the real name get displayed there?

His question is “Is it possible to change the quote mechanism so that it pulls in the name instead of the username?” but I’m pretty sure that’s not the way to go about this.


Hmm. Automagically replacing the usernames for @mentions with names might be an interesting approach in general – in the same way that links are unfurled as oneboxes (occasionally, to my annoyance :stuck_out_tongue: ).


Hmm this would need a site setting… what do you think @sam?


Since real names are not guaranteed to be unique, that would open up a lot of possibilities for causing confusion (either on purpose or by coincidence).

So I’d at least make sure that the username stays visible as well (like : “Jay Pfaffman (pfaffman)” )


I see the point, but this format is already being used in some places (e.g. invitation emails) and I have found it not an ideal solution either, especially when the user name is similar to the real name.

I’m don’t have the perfect solution either, but I think it might help (as a general rule anywhere on discourse) if usernames were always displayed with a leading @? Or at least whenever they are displayed together with the real name?

1 Like

I think that showing the full name instead of the username on quotes makes sense if (and only if) the (default-on) site setting prioritize username in ux is disabled – quotes should match what is shown on a normal post :slight_smile:


I dunno about that, as in, default on, but it is interesting as an option. I am curious what @sam thinks since he worked on this last.

1 Like

Wait a minute, what exactly are you suggesting? I thought you mean if usernames are not prioritized (i.e. if real names are prioritized, which is not the default setting), then real names should be displayed in quotes. That would make sense to me but you are in fact saying the opposite.

1 Like

Oops, I mixed things up. Of course, I do mean the exact opposite. I edited my post above to reflect this.
Thanks for reading carefully :wink:


It’d be great to hear from @sam. My client just asked again. :slight_smile:

This still does not remove usernames.

The problem:

Our usernames are so rubbish we don’t want to ever show them.

Is not a problem we have looked at solving.

Imagine we have a “Bob McBob” with the username @jkdh

If we introduced this new “mode”

  • @jkdh should do nothing
  • @Bob McBob needs to somehow work
  • Quotes need fixing
  • Composer needs fixing
  • A global @username rendering suppression needs to be added.

I guess this would be more consistent with the prioritize usernames in ux disabled:

I am not against improving it. But it would require some work.

Specifically our quote format should probably change from:

[quote="fefrei, post:6, topic:63447"]

To a much more easier to maintain

[quote="2342347"] <= use post_id which is stable against username and name changes and post moves.

There is also the huge question about what happens when a user changes names (which is far more commonly allowed than username changes). At least a new format would not require raw markdown changes.

So the bottom line here is…

Big :cactus: of worms.

See also, our second oldest bug:



Thanks for explaining, @sam. Does what you say here also apply to this related issue:

That’s all that I need to solve right now. Users will quote posts using the interface, and it’ll generate the correct [quote] tag. All that this client wants is to have the Real Name next to the username in the quote block, just exactly the same as it is in a normal old post the way it does when prioritize username in ux is disabled.

It seems like if it displays the full name in the post it should also display it in the quote, no?

The client really needs this solved. If this doesn’t seem like something that might make it into core soon, would it be difficult for a plugin to just add the real name to quotes?

1 Like

Has this change started happening? It seems that in the preview, the user avatar shows even when the username has been changed in the quote. But when the message is posted the avatar doesn’t display.

1 Like

We’ve cleaned up most of the Full Name vs username changes across our site though a custom plugin and some theme changes, but we would be interested in putting in the work to convert this into a patch to core if the Discourse team is open to that.

Sam did comment that he may want to change the quoting format, but we could still lookup the full name based on the username if it’s not time to make this change.


Changing quote format is going to be a mammoth task and I don’t think it is wise at the moment to head down that path.

Adding support for showing full name in quote keeping current markdown is something we would be happy with though.