# Get current user

**URL:** <https://community.hubspot.com/t/get-current-user/89979>\
**Category:** CMS Development\
**Tags:** design-manager\
**Created:** [September 19, 2023, 6:45pm UTC](https://community.hubspot.com/t/get-current-user/89979 "2023-09-19T18:45:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jillii](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jillii/32/195472_2.png) [@jillii](https://community.hubspot.com/u/jillii)\
**Post date:** [September 19, 2023, 6:45pm UTC](https://community.hubspot.com/t/get-current-user/89979/1 "2023-09-19T18:45:45Z")

</div>

Is there a way to get the currently logged in user, from within a custom module? Hubspot has default variables that return information about the current page, for example {{ content }} would return the content of the current post/page. Is there something similar - along the lines of {{ current\_user }} that can be used to get information about the current user?

---

<div class="post-metadata">

**Author:** ![zach\_threadint](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zach_threadint/32/46318_2.png) [@zach\_threadint](https://community.hubspot.com/u/zach_threadint)\
**Post date:** [September 20, 2023, 12:57am UTC](https://community.hubspot.com/t/get-current-user/89979/2 "2023-09-20T00:57:54Z")

</div>

Hi @jillii 👋

I could be way off, but have you tried using the “request\_contact” variable (as per [this doc](https://developers.hubspot.com/docs/cms/hubl/variables)). I stumbled across it when reading the HubSpot Developer Blog post [“How to create a header navigation that adapts to a logged-in contact”](https://developers.hubspot.com/blog/creating-a-header-nav-that-adapts-to-if-the-contact-is-logged-in).

I hope this proves useful. Please let me know if you have any follow-up questions.

---

<div class="post-metadata">

**Author:** ![jillii](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jillii/32/195472_2.png) [@jillii](https://community.hubspot.com/u/jillii)\
**Post date:** [September 20, 2023, 4:45pm UTC](https://community.hubspot.com/t/get-current-user/89979/3 "2023-09-20T16:45:44Z")

</div>

I saw that too, and it definitely looked promising. It’s returning empty (shown below), even though I’m looking in my cookies and seeing that hubspot _is_ tracking me - so it should return something…

`(ContentRequestContact: {company={}, companyDefaults={}, companyWithDefaults={}, companyWithoutDefaults={}, contact={}, contactDefaults={}, contactVid=null, contactWithDefaults={}, contactWithDefaultsPreview={hubspot_owner_id={}}, contactWithoutDefaults={}, dealId=Optional.empty, emailCampaignId=null, emailPortalPair=null, idType=null, identifier=null, isHubspotUser=false, isLoggedIn=false, isSsoLogin=false, lazyAccountWithDefaultsForPreview={{account}}, lazyCompanyWithDefaults={}, lazyCompanyWithDefaultsForPreview={{company}}, lazyCompanyWithoutDefaults={}, lazyContactWithDefaults={}, lazyContactWithDefaultsForPreview={{contact}}, lazyContactWithDefaultsPreview={hubspot_owner_id={}}, lazyContactWithoutDefaults={}, lazyOwnerDefaultsWithDefaultOwnerLookup={}, lazyOwnerWithDefaults={}, lazyOwnerWithDefaultsForPreview={{owner}}, lifecycleStage=null, lifecycleStageId=null, listMemberships=[], owner={}, ownerDefaultsWithDefaultOwnerLookup={}, ownerWithDefaults={}, qualified=false, resolvedContact=Optional.empty})`
