Displaying a Custom User Field on a post

We have a custom user field for member ID that we would like to have show next to the member’s username on a post on our Discourse-hosted site. There isn’t a setting for this, is there an existing theme component to do this?

1 Like

i have this for user cards and profile. can probably use a plugin-in api to get it into posts.

I haven’t figured out exactly what user cards are yet. :slight_smile: How are they different from the user’s public profile?

click/ tap one of our avatars in this topic to get the user card. click/ tap the avatar on the user card to get our profiles :slight_smile:

let me know if you want help configuring the custom user field

for anyone who needs to do this, here’s how i do it on my site:

admin-customize-user fields

user preferences, profile tab:

how it appears on user card and profile:


I figured out the custom user fields, populating them from our member database is a separate matter, the Discourse transition team was asked to include this in our data migration.

Eventually we hope to use a single-sign-on from our Drupal-based website to get to Discourse, but the module to do that doesn’t appear to have anyone actively supporting it and I don’t know if it even works.

1 Like

here’s how to do this part:

1 Like

Thanks, this should give me a good starting point.

Will this being a Discourse-hosted site impact our ability to write a custom theme component, since that seems to be the missing link? (Having the ability to display a custom data field on a post seems like something that should be a setting.)