# Access User Fields for custom components

**URL:** https://meta.discourse.org/t/access-user-fields-for-custom-components/188305
**Category:** Feature
**Created:** [April 27, 2021, 8:40pm UTC](https://meta.discourse.org/t/access-user-fields-for-custom-components/188305 "2021-04-27T20:40:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bguan2020](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bguan2020/32/218448_2.png) [@bguan2020](https://meta.discourse.org/u/bguan2020)
#### Post date: [April 27, 2021, 8:40pm UTC](https://meta.discourse.org/t/access-user-fields-for-custom-components/188305/1 "2021-04-27T20:40:23Z")

</div>

I’m using a custom header component to add external links on the header. I also have a user field that is a link to their profile on a separate website(each users’ profile link is unique). Is there any way I can access that unique link and make that a link in Discourse’s Custom Header Links component?

---

<div class="post-metadata">

### Author: ![Mark\_Schmucker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mark_schmucker/32/124810_2.png) [@Mark\_Schmucker](https://meta.discourse.org/u/Mark_Schmucker)
#### Post date: [April 27, 2021, 10:03pm UTC](https://meta.discourse.org/t/access-user-fields-for-custom-components/188305/2 "2021-04-27T22:03:55Z")

</div>

This has been asked a few times. From my understanding, the short answer is no, except maybe with some javascript, and there is a feature request which you should “like” if it would help you.

> [@How to insert a system variable in a post?](https://meta.discourse.org/t/how-to-insert-a-system-variable-in-a-post/131425):
>
> I would like to insert a system variable in a post (for example site\_name). If our site\_name is OJODIGITAL, I had expected that when I insert in a post this text site\_name would have been substituted for OJODIGITAL, but it is not. Hello friend, in our site %{site\_name} you can see …. I have seen this kind of constructions in text customization messages (site adjustments/Customize/Text). Is it possible to do that? How?

> [@How to insert a system variable in a post?](https://meta.discourse.org/t/how-to-insert-a-system-variable-in-a-post/131425/2):
>
> This is not possible at the current time.

> [@Using Discourse variables to personalize embedded Typeform](https://meta.discourse.org/t/using-discourse-variables-to-personalize-embedded-typeform/111329/5):
>
> Here is my (somewhat clumsy) solution, in case it helps someone. I added this code under Admin \> Customize \> Themes \> Edit CSS/HTML \> /head: \<script type="text/discourse-plugin" version="0.8"\> api.decorateCooked($elem =\> { var i, j; var selector = 'https://example.typeform.com'; // seems like this should work but it doesn't: // var typeforms = $elem[0].querySelectorAll('src^=[' + selector + ']'); var ps = $elem[0].querySele…

> [@Please add variable insertion in post possible](https://meta.discourse.org/t/please-add-variable-insertion-in-post-possible/131444):
>
> It would be great to be able to insert a system variable in a post (for example site\_name). If our site\_name is OJODIGITAL, I had expected that when I insert in a post this text site\_name would have been substituted for OJODIGITAL, in a similar way that can be done in text customization (site adjustments/customize/text) Hello friend, in our site %{site\_name} you can see ….
