Hide User Profiles setting incomplete

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?

https://github.com/discourse/discourse/commit/bb79e6aff7acd95d1dac8fcf367978af2ad81162

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

「いいね!」 1

What is the value of the enable names site setting?

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.

No. There is a site setting called enable names

Is it turned off?

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?

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;
}
「いいね!」 4

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;
}
「いいね!」 1

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.

「いいね!」 3

これを機能にできませんか?「ユーザープロフィールを非公開にする」を有効にしても、すべてのTL1ユーザーのリストが表示されるため、アカウントを持っていない人にとっては、依然として多くのユーザーが表示されます。アカウントの作成は簡単ですが、この小さな閾値は便利です。これがないと、「ユーザープロフィールを非公開にする」オプションは不完全であり、効果がありません。

これを再度取り上げます(ちょうど私にも発生したので)。私は半プライベートなインスタンス(betterstreets.nz)を持っています。いくつかのカテゴリは公開されていますが、多く(ユーザー関連のものを含む)は公開されていません。バッジ以外は!

最近では、ユーザーリストはプログラム的に anon から非表示になっているようです(やった!)、そして各グループも手間なく非表示に設定できます。

しかし、バッジは anon からはまだ表示されます。これには何か理由がありますか?私は次のようにして非表示にしました。

// バッジを anon から非表示にする
.anon .hamburger-panel .menu-panel a.badge-link {
    display: none;
}
.anon .badges-page div#main-outlet-wrapper {
    display: none;
}
「いいね!」 1

このトピックは2454日後に自動的に閉じられました。返信はもう許可されていません。