Gibt es eine Möglichkeit, die Profileinstellung „Mein öffentliches Profil und meine Präsenz verbergen" zu deaktivieren?

I’ve got a community that does not want users to hide their profile or online presence. I don’t see a site setting to disable this. Is there a way to hide the checkbox on the user profile with CSS? It doesn’t seem to have a thingy that identifies just that field.

Even if it doesn’t, you can target it using numeric offsets in the CSS, conceptually “hide the third thing in this <div>” or whatever.

The only risk is that if the list later changes size, your offset will be incorrect.

This should work so long as it stays the last item on that list:

.user-preferences .control-group.other .controls:last-of-type {
  display: none;
}

Beyond that, you can also remove it altogether by modifying the template. All you need is to use this:

<script type="text/x-handlebars" data-template-name="preferences/interface">

</script>

and copy / paste the contents of this file in there after removing line #43

If you modify the template and it’s updated in core, you need to update your template as well.

Thanks for the instructions, but we feel it’s quite a clumsy solution. Especially for those who are using common branches: the fixes can essentially break anytime. Any chance of having a proper CSS target for hiding the setting? Or even better, an admin setting to disallow the feature?

Agreed, can we make sure there is a proper css target here in the markup @awesomerobot?

A few sections in user preferences were missing classes, so I’ve added them here

https://github.com/discourse/discourse/commit/9a3dd6b59af0a5fc22045f376b421cb4fd074aad

You’ll be able to simplify to

.pref-hide-profile {
  display: none;
}

Ist das bei gehosteten Communities möglich?

Das ist möglich. Wenn du zu admin > anpassen > Themes gehst, kannst du das obige CSS zu deinem Theme hinzufügen, um die Einstellung auszublenden.

Ist es möglich, mit dem Data Explorer eine Abfrage auszuführen, um zu sehen, welche Benutzer diese Einstellung aktiviert haben, mit anderen Worten, Benutzer, die ihr öffentliches Profil ausgeblendet haben?

Du wirst etwas wie folgendes benötigen:

SELECT user_id FROM user_options WHERE hide_profile_and_presence = true

Nur ein kleines Update dazu. Es gibt jetzt die Admin-Einstellung Benutzern erlauben, ihr Profil zu verbergen, die Sie verwenden können, um dies zu erreichen: