# HubL functionality for private content

**URL:** <https://community.hubspot.com/t/hubl-functionality-for-private-content/118512>\
**Category:** CMS Development\
**Tags:** professional, enterprise\
**Created:** [October 16, 2024, 4:13pm UTC](https://community.hubspot.com/t/hubl-functionality-for-private-content/118512 "2024-10-16T16:13:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![naav97](https://avatars.discourse-cdn.com/v4/letter/n/848f3c/32.png) [@naav97](https://community.hubspot.com/u/naav97)\
**Post date:** [October 16, 2024, 4:13pm UTC](https://community.hubspot.com/t/hubl-functionality-for-private-content/118512/1 "2024-10-16T16:13:19Z")

</div>

Is it possible in HubL to retrieve information about the currently logged-in user on a [private web page](https://knowledge.hubspot.com/website-pages/require-member-registration-to-access-private-content)?

We are creating a private page and want to display different content based on the user visiting the page. I am aware of HubSpot functions like [crm\_objects](https://developers.hubspot.com/docs/cms/hubl/functions#crm-objects) to retrieve and filter data, but I need a way to access user-specific information, such as the user’s email, to use as a filter. Is there a way to do this in HubL?

---

<div class="post-metadata">

**Author:** ![evaldas](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evaldas/32/69160_2.png) [@evaldas](https://community.hubspot.com/u/evaldas)\
**Post date:** [October 16, 2024, 5:45pm UTC](https://community.hubspot.com/t/hubl-functionality-for-private-content/118512/2 "2024-10-16T17:45:20Z")

</div>

Hi @naav97,

To clarify, you would like a person to log into a private web page and they would see the information displayed from the properties of their contact record?

If so, you can use the crm\_object like so:

`{% set contact = crm_object('contact', request.contact.contact_vid, 'firstname,lastname,company,email') %}`

Then you would use an expression to display a value of that property, like so:

`{{ contact.firstname }}`

Hope this helps!

---

<div class="post-metadata">

**Author:** ![naav97](https://avatars.discourse-cdn.com/v4/letter/n/848f3c/32.png) [@naav97](https://community.hubspot.com/u/naav97)\
**Post date:** [October 16, 2024, 10:55pm UTC](https://community.hubspot.com/t/hubl-functionality-for-private-content/118512/3 "2024-10-16T22:55:39Z")

</div>

Hi @evaldas

Yes, this is exactly what I was looking for! I also discovered that the contact variable is already populated with the necessary information, so there’s no need to overwrite it with the crm\_object call.

Thanks so much for your help!

---

<div class="post-metadata">

**Author:** ![SteffenPapke](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/steffenpapke/32/26012_2.png) [@SteffenPapke](https://community.hubspot.com/u/SteffenPapke)\
**Post date:** [October 24, 2024, 8:11am UTC](https://community.hubspot.com/t/hubl-functionality-for-private-content/118512/4 "2024-10-24T08:11:25Z")

</div>

Thanks for sharing
