Hide User Profiles setting incomplete


(Robert McIntosh) #1

The 'Hide User Profiles from Public’ option is a great feature for hiding user details, particularly their Display name, from anonymous users, but it is incomplete.

Even when this feature is enabled, the lists in the Users, Groups and Badges directories (available to all visitors via the Hamburger menu) still show the user’s Display Name. Why are these not hidden here as well?

My use case is:

  • site can be browsed by public
  • users’ details are private (so cards only load for logged-in members)
  • the site offers a list of groups and badges, without revealing private information

This could be achieved by removing the Display Name from the fields shown on these lists, or by removing the Directory aspect of these pages and leaving only the list of Badges or Groups with their descriptions, but not who belongs to them, for all Anonymous users.

Am I missing something? Is there a way to achieve this?

Example of page where Hide Profiles is enabled, and visitor is not logged in, but names are displayed:


(Jay Pfaffman) #2

What is the value of the enable names site setting?


(Robert McIntosh) #3

Do you mean the value of hiding them?

We have a membership organisation where we would have wanted to insist on real names but that might have put more private members off participating in a public forum, so we compromised by allowing (and showing) usernames only, but keeping ‘real names’ in the Display Name field so at least other members would always know who they were talking to.

It works great across the rest of the site, but there is no point turning off the user cards with the private information (including name) if you then display this same information on another page. It seems it is inconsistent when it comes to privacy.


(Jay Pfaffman) #4

No. There is a site setting called enable names

Is it turned off?


(Robert McIntosh) #5

Ah! It is enabled, but turning that off goes too far the other way (as I understand it)

I DO want their names to be shown to other logged-in users (i.e. other members of the society). I do not want to remove them from the site as a whole or 'Disable to hide full name everywhere'. I only want to hide this field to anonymous users. There is no reason to display anything other than usernames to anonymous users. That is what happens in the topics, why is this not the case in the directories?


(Joshua Rosenfeld) #6

Hmm…so I just tested this. If I have enable names, display name on posts, and hide user profiles from public all checked, full names do appear on posts for anonymous users. I couldn’t find a setting combination that would display full names on posts on for logged-in users.

Hide User Profiles from Public is doing what it’s intended to, it’s preventing access to the user’s profiles. A “full name” is not generally a secret, nor is it part of the “user profile”, hence why it is not hidden by this setting.

What you can do is hide the names via CSS. The following CSS hides the name field on badge pages for anonymous users only.

.anon .show-badge .name {
    display: none;
}

Customizing CSS
(Robert McIntosh) #7

Thanks - that works well for the Badges

Can the same be done for Groups? What’s the class for that?

EDIT: I think I got it working with (is this going to cause any issues?):

.anon .user-detail .name {
    display: none;
}

(Joshua Rosenfeld) #8

With any CSS change there can always be unexpected side effects, but given that the rule only targets anonymous users, and removes any name references (which is your goal) I think you’re set.