Hiding usernames from UX

In admin settings

I unflagged:

  • prioritize username in ux

I flagged:

  • enable names
  • use name for username suggestions
  • display name on posts

In this case I still see usernames:

  1. in suggestions when I try to mention someone (and the username appears before the real name)
  2. inside a topic, if real name and username are not the “same” (ignoring spaces)

My goal is to:

  • hide the username or postpone it for case 1
  • hide the username for case 2

Tks! :nerd_face:

It’s generally not feasible to hide usernames entirely; each user is required to have a unique username, but many users may have the same full name.

To prioritize using full names in mention suggestions, you’d need a custom plugin. I don’t think anyone’s built one that does that yet.

For hiding usernames on posts, some CSS should be able to handle it…

.topic-body .topic-meta-data .username {
  display: none; 

Note that this CSS change could cause some abuse problems. If usernames are hidden, I could change my full name and avatar to match someone else’s, and without a username it becomes much harder to see the difference.


Right. It would be easier to require (by rule) the username be their name and disable names.

Why do you hate usernames so much?


On top of that code,

.username {
.user-main .about .details h2 {
div.control-group.pref-username {

I also advise against this, but there you go. I see no real reason behind it

In my forum, private one, I’d not give possibility to change real name.

I manage a little school and I want students using their real names, not usernames.

The reason is to encourage people to know each other, because they are students from the same school.

Tks for the code, I’ll try it! :blue_heart:

Question: is possible to disable real name change?

1 Like

It works, just two notations:

  1. when I mention someone, I can search by usernames and real names, but Discourse makes me see just real names, perfect
  2. when I choose the user to mention, in the editor/forum will appear the username (and it’ll be clickable): is possible to make the real name visible in these cases?

If you make their user names their real names your problem goes away.


Yeps, it’s just I don’t like to see usernames (no spaces) and they would still be able to change their real names.

If you disable the “enable names” feature, they won’t have names, just usernames. You’d have to settle for _ rather than space.

Or you could write a custom plugin to do what you think you want.

If you don’t disable them as I suggest, you could hide the name changing stuff with CSS and have a community rule that if they changed their name (by un-hiding the CSS in their browser) that they would be appropriately punished.

1 Like