# Is there a way to disable the \`hide my public profile and presence features\` profile setting?

**URL:** https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593
**Category:** Support
**Created:** [October 26, 2018, 10:28pm UTC](https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593 "2018-10-26T22:28:33Z")
**Posts on this page:** 13
**Page:** 1

<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: [October 26, 2018, 10:28pm UTC](https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593/1 "2018-10-26T22:28:33Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [October 27, 2018, 12:20am UTC](https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593/2 "2018-10-27T00:20:14Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [October 28, 2018, 2:24am UTC](https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593/3 "2018-10-28T02:24:36Z")

</div>

This should work so long as it stays the [last item on that list](https://developer.mozilla.org/en-US/docs/Web/CSS/:last-of-type):

```plaintext
.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:

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

</script>

```

and copy / paste the contents of [this file](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/preferences/interface.hbs) 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.

---

<div class="post-metadata">

### Author: ![rizka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rizka/32/79717_2.png) [@rizka](https://meta.discourse.org/u/rizka)
#### Post date: [May 31, 2019, 4:55pm UTC](https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593/4 "2019-05-31T16:55:03Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 31, 2019, 5:38pm UTC](https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593/5 "2019-05-31T17:38:51Z")

</div>

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

---

<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: [June 3, 2019, 5:37pm UTC](https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593/7 "2019-06-03T17:37:00Z")

</div>

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

[https://github.com/discourse/discourse/commit/9a3dd6b59af0a5fc22045f376b421cb4fd074aad](https://github.com/discourse/discourse/commit/9a3dd6b59af0a5fc22045f376b421cb4fd074aad)

You’ll be able to simplify to

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

```

---

<div class="post-metadata">

### Author: ![simonzo](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@simonzo](https://meta.discourse.org/u/simonzo)
#### Post date: [August 12, 2019, 2:22pm UTC](https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593/8 "2019-08-12T14:22:26Z")

</div>

Is this possible on hosted communities?

---

<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 12, 2019, 2:29pm UTC](https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593/9 "2019-08-12T14:29:49Z")

</div>

It is, if you go to `admin > customize > themes` you’ll be able to add the CSS above to your theme to hide the setting.

---

<div class="post-metadata">

### Author: ![alexs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexs/32/139956_2.png) [@alexs](https://meta.discourse.org/u/alexs)
#### Post date: [August 12, 2019, 4:06pm UTC](https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593/10 "2019-08-12T16:06:09Z")

</div>

Is it possible to run a query using [Data Explorer](https://meta.discourse.org/t/32566?silent=true) to see which users have this setting enabled, in other words, users who have hidden their public profile?

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [August 13, 2019, 2:36pm UTC](https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593/11 "2019-08-13T14:36:21Z")

</div>

you’ll want something like:

`SELECT user_id from user_options where hide_profile_and_presence = true`

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [February 24, 2023, 10:07pm UTC](https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593/12 "2023-02-24T22:07:56Z")

</div>



---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [February 25, 2023, 7:12am UTC](https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593/13 "2023-02-25T07:12:17Z")

</div>

Just a small update on this one. There is now the `allow users to hide profile` admin setting you can use to achieve this:

 ![allow users to hide profile](https://global.discourse-cdn.com/meta/original/4X/d/f/f/dff0365b9be7a3007ab8d377e9e533b0613c4400.jpeg)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [February 25, 2023, 7:12am UTC](https://meta.discourse.org/t/is-there-a-way-to-disable-the-hide-my-public-profile-and-presence-features-profile-setting/100593/14 "2023-02-25T07:12:26Z")

</div>


