# Custom user fields and presentation on profile (and popup)

**URL:** https://meta.discourse.org/t/custom-user-fields-and-presentation-on-profile-and-popup/40967
**Category:** Feature
**Created:** [March 13, 2016, 1:49pm UTC](https://meta.discourse.org/t/custom-user-fields-and-presentation-on-profile-and-popup/40967 "2016-03-13T13:49:40Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![daath](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daath/32/115536_2.png) [@daath](https://meta.discourse.org/u/daath)
#### Post date: [March 13, 2016, 1:49pm UTC](https://meta.discourse.org/t/custom-user-fields-and-presentation-on-profile-and-popup/40967/1 "2016-03-13T13:49:40Z")

</div>

I’ve set my forum up with SSO - works great!

My main concern right now, is that I would like to have a new link on the profile page, and the profile popup - I would like to link back to the main site with the external ID - how do I go about doing that without breaking Discourse when I update (which I do almost every day).

I also have a couple of custom user fields, and they show up ok. Like twitter handle, for instance. However, I would like to make a link out of the handle.

Are there any examples of anything of the above?

Thanks! 🙂

---

<div class="post-metadata">

### Author: ![daath](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daath/32/115536_2.png) [@daath](https://meta.discourse.org/u/daath)
#### Post date: [March 15, 2016, 11:12pm UTC](https://meta.discourse.org/t/custom-user-fields-and-presentation-on-profile-and-popup/40967/2 "2016-03-15T23:12:12Z")

</div>

Noone links back from their profile page to their main site?

I’d _ **really** _ love a way to link from a user’s forum profile page to the main site using the external ID! 🙂 Any hint? Experience?

---

<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: [March 15, 2016, 11:59pm UTC](https://meta.discourse.org/t/custom-user-fields-and-presentation-on-profile-and-popup/40967/3 "2016-03-15T23:59:59Z")

</div>

Yes, this comes up a fair bit.. @sam was working with another trial that needed this. Perhaps @techapj could take this and write up a howto @sam?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 16, 2016, 12:03am UTC](https://meta.discourse.org/t/custom-user-fields-and-presentation-on-profile-and-popup/40967/4 "2016-03-16T00:03:49Z")

</div>

Sure, we may need add a few outlets, not sure but totally fine for @techAPJ to take this, I can help guide him.

Critical thing is that we want the example not to require any plugins, so needs to be done via a site customization.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [March 19, 2016, 5:17pm UTC](https://meta.discourse.org/t/custom-user-fields-and-presentation-on-profile-and-popup/40967/5 "2016-03-19T17:17:59Z")

</div>

Okay, we now have a howto for this:

> [@(Retired) Use an ID in a custom user field to link to a user's external profile](https://meta.discourse.org/t/link-custom-user-field-to-external-website/41218):
>
> Let’s say you want to add a link of User’s main profile page on Discourse user profile page and user card, clicking on that link will take user to main (external) website. The link of main website user profile page will be like: http://myawesomewebsite.com/user/USER\_PROFILE\_ID Let’s get started! Create a custom user field Let’s create a user field with name User Profile. Make sure “Show on public profile?” option is enabled. The above field will store external user profile IDs. A…

---

<div class="post-metadata">

### Author: ![daath](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daath/32/115536_2.png) [@daath](https://meta.discourse.org/u/daath)
#### Post date: [March 19, 2016, 8:30pm UTC](https://meta.discourse.org/t/custom-user-fields-and-presentation-on-profile-and-popup/40967/6 "2016-03-19T20:30:59Z")

</div>

That is so cool 😃 How do I get the external\_id-field from the SSO though? Your example seems to be an external ID that people input themselves…

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [March 20, 2016, 12:36am UTC](https://meta.discourse.org/t/custom-user-fields-and-presentation-on-profile-and-popup/40967/7 "2016-03-20T00:36:00Z")

</div>

> [@daath](#):
>
> How do I get the external\_id-field from the SSO though?

Answered here:

> [@(Retired) Use an ID in a custom user field to link to a user's external profile](https://meta.discourse.org/t/link-custom-user-field-to-external-website/41218/11):
>
> You will have to save the user external\_id in custom field when creating SSO record. See example here: Or you can fill the custom user field via sync\_sso method. For example: client.sync\_sso( sso\_secret: "discourse\_sso\_secret", name: "Test Name", username: "test\_name", email: "name@example.com", external\_id: "2" custom.user\_profile\_id: "2" ) Relevant [code here](https://github.com/discourse/discourse_api/blob/master/lib/discourse_api/api/sso.rb#L14-L16).
