# Restrict public viewing of user profile

**URL:** <https://meta.discourse.org/t/restrict-public-viewing-of-user-profile/21098>\
**Category:** Feature\
**Created:** [2014年十月14日 08:39 UTC](https://meta.discourse.org/t/restrict-public-viewing-of-user-profile/21098 "2014-10-14T08:39:27Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![JSey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jsey/32/3540_2.png) [@JSey](https://meta.discourse.org/u/JSey)\
**Post date:** [2015年九月13日 17:43 UTC](https://meta.discourse.org/t/restrict-public-viewing-of-user-profile/21098/21 "2015-09-13T17:43:20Z")

</div>

Understood. Now, I am trying to figure out a way out of this: I would like to have a better solution for hiding the last\_seen\_at than to re-include the whole user/user.hbs in a user script just to drop the `model.last_seen_at` line (if viewed by an anonymous user). Since `last_seen_at` is a property of the model object which I cannot really overwrite - I do not really see another way out, does anybody else?

---

<div class="post-metadata">

**Author:** ![ColdSun](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/coldsun/32/66668_2.png) [@ColdSun](https://meta.discourse.org/u/ColdSun)\
**Post date:** [2015年九月13日 22:11 UTC](https://meta.discourse.org/t/restrict-public-viewing-of-user-profile/21098/22 "2015-09-13T22:11:57Z")

</div>

That’s the solution I’d use. Granted, I’d be thinking about other tweaks and edits I’d want to do in the future and would figure that I may as well start now.

---

<div class="post-metadata">

**Author:** ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)\
**Post date:** [2015年九月14日 00:08 UTC](https://meta.discourse.org/t/restrict-public-viewing-of-user-profile/21098/23 "2015-09-14T00:08:53Z")

</div>

Related:

> [@Is there any possibility, that only Members can view the personal Profiles?](https://meta.discourse.org/t/is-there-any-possibility-that-only-members-can-view-the-personal-profiles/23948):
>
> Hello Members, I would like to avoid, that anyone in the “www” can read and visit my members profiles. Is it possible, that everyone can read in the forum, but if you want wo visit a profile you have to log in and create an account? Thanks in advance Johannes

(Posting to say this has been requested before; I fully support this option to be in core.)

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [2015年十月28日 18:57 UTC](https://meta.discourse.org/t/restrict-public-viewing-of-user-profile/21098/24 "2015-10-28T18:57:40Z")

</div>

You can now use the “`hide_user_profiles_from_public`” site setting 🍇

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

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [2015年十月28日 18:57 UTC](https://meta.discourse.org/t/restrict-public-viewing-of-user-profile/21098/25 "2015-10-28T18:57:42Z")

</div>



[上一頁](https://meta.discourse.org/t/restrict-public-viewing-of-user-profile/21098.md?page=1)
