# Hiding usernames from UX

**URL:** https://meta.discourse.org/t/hiding-usernames-from-ux/234641
**Category:** Support
**Created:** [August 1, 2022, 6:29am UTC](https://meta.discourse.org/t/hiding-usernames-from-ux/234641 "2022-08-01T06:29:24Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![raffoz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/raffoz/32/269135_2.png) [@raffoz](https://meta.discourse.org/u/raffoz)
#### Post date: [August 1, 2022, 6:29am UTC](https://meta.discourse.org/t/hiding-usernames-from-ux/234641/1 "2022-08-01T06:29:24Z")

</div>

# 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! 🤓

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [August 1, 2022, 3:08pm UTC](https://meta.discourse.org/t/hiding-usernames-from-ux/234641/2 "2022-08-01T15:08:43Z")

</div>

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…

```css
.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.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 1, 2022, 4:44pm UTC](https://meta.discourse.org/t/hiding-usernames-from-ux/234641/3 "2022-08-01T16:44:57Z")

</div>

> [@awesomerobot](#):
>
> It’s generally not feasible to hide usernames entirely;

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

Why do you hate usernames so much?

---

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [August 1, 2022, 11:43pm UTC](https://meta.discourse.org/t/hiding-usernames-from-ux/234641/4 "2022-08-01T23:43:43Z")

</div>

On top of that code,

```css
.username {
    display:none;
}
.user-main .about .details h2 {
    display:none;
}
div.control-group.pref-username {
    display:none;
}

```

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

---

<div class="post-metadata">

### Author: ![raffoz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/raffoz/32/269135_2.png) [@raffoz](https://meta.discourse.org/u/raffoz)
#### Post date: [August 2, 2022, 4:28am UTC](https://meta.discourse.org/t/hiding-usernames-from-ux/234641/5 "2022-08-02T04:28:28Z")

</div>

> [@awesomerobot](#):
>
> If usernames are hidden, I could change my full name and avatar to match someone else’s

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

> [@pfaffman](#):
>
> Why do you hate usernames so much?

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

> [@darkpixlz](#):
>
> I see no real reason behind it

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! 💙

* * *

Question: is possible to disable real name change?

---

<div class="post-metadata">

### Author: ![raffoz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/raffoz/32/269135_2.png) [@raffoz](https://meta.discourse.org/u/raffoz)
#### Post date: [August 2, 2022, 4:54am UTC](https://meta.discourse.org/t/hiding-usernames-from-ux/234641/12 "2022-08-02T04:54:26Z")

</div>

> [@darkpixlz](#):
>
> On top of that code,
> 
> ```plaintext
> .username {
> display:none;
> }
> .user-main .about .details h2 {
> display:none;
> }
> div.control-group.pref-username {
> display:none;
> }
> 
> ```

> [@awesomerobot](#):
>
> For hiding usernames on posts, some CSS should be able to handle it…
> 
> ```plaintext
> .topic-body .topic-meta-data .username {
> display: none; 
> }
> 
> ```

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?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 2, 2022, 12:15pm UTC](https://meta.discourse.org/t/hiding-usernames-from-ux/234641/14 "2022-08-02T12:15:11Z")

</div>

> [@raffoz](#):
>
> manage a little school and I want students using their real names, not usernames.

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

---

<div class="post-metadata">

### Author: ![raffoz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/raffoz/32/269135_2.png) [@raffoz](https://meta.discourse.org/u/raffoz)
#### Post date: [August 2, 2022, 12:27pm UTC](https://meta.discourse.org/t/hiding-usernames-from-ux/234641/15 "2022-08-02T12:27:37Z")

</div>

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

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 2, 2022, 10:00pm UTC](https://meta.discourse.org/t/hiding-usernames-from-ux/234641/16 "2022-08-02T22:00:07Z")

</div>

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.

> [@raffoz](#):
>
> they would still be able to change their real names.

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.
