Forum Discussion
Hey Kaela,
Thanks for such a quick response! In regards to your questions, thanks for bringing up those points, as they relate to my community:
1. Foruntately we have the first and last name for all of our users as we use SSO tied to our existing registration process (which requires a name and is usually accurate). Additionally, half of our user base are our interntal customers which have 100% accurate information.
2. That's an interesting thought but I feel pretty comfortable switching it on as, by default, we show first and last name on their user profile page.
Also, I'm assuming the custom component could be placed everywhere a username is used?
Thanks,
Colin
Hi Colin,
It really depends on how you construct the component. There are a few different context objects you can make use of with freemarker:
- env.context.message.author - if the component is within the context of a message, this will give you the author of the message.
- page.context.user - if you place the component on the ViewProfilePage, this will give you the user whose profile page is currently being displayed
- user.id - On any page, this will give you the id of the user viewing the page
So you could very well construct a single component that handled a bunch of different cases. However, depending on exactly what you're trying to accomplish, it might be easier to just have separate, specific-use components.
I hope this helps!
Related Content
- 6 years ago