Forum Discussion
Hi @igo
The user biography is a permission driven setting which can be enabled or disabled by user from My Settings -> Preferences -> Privacy -> Show private information to URL: (/t5/user/myprofilepage/tab/user-preferences:privacy) Please see the attached screenshot for your reference. You need to set it to "All" in order to see it for non-admin users as well.
If you need to show it in all conditions (non-admin users) consider using restadmin calls to fetch the user biography in your customization. Though it is not recommended to use excesive Restadmin calls as it effects the performance of the application and can cause security vulnerability.
Thanks
- igor_nadiein4 years agoGuide
But with restadmin request I receive the same error exception in the console "This widget could not be displayed."
Why it complains on Widget if I'm requesting data from DB, not the widget?
So I wonder, is there a way to show that author bio in the Articles for Members, who are watching that Article without Author given permission for that?
Sounds for me that we do need to request from DB the list of all users and set the setting flag to TRUE to show that bio for everybody.
- TysonN4 years agoKhoros Alumni (Retired)
him_varma is correct.
Your code is probably throwing a freemarker error for a non-admin user because one of your freemarker objects doesn't exist for a non-admin user. And of course the error message for a non-admin user won't include any useful debugging info.
The component might fail more gracefully if you add an additional check like so:
<#if (res.data.items[0].biography)?has_content>...</#if>
This will check for both not null and not empty. However, it won't address the issue of some profile fields not being retrievable for non-admin users via a rest() call. This may be an acceptable use case for restadmin().
Related Content
- 4 months ago
- 9 months ago
- 12 months ago