How to customize user name appearance in header bar?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2015 11:21 PM
For example, in any demo instance when we log in as admin it says "System Administrator". What if i want to make it look some other way round eg: "Administrator System" / UserID / anything else from user record.?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2015 11:27 PM
HI Sumeet,
You can change this in the UI macro "cms_header_login" which holds the code to display the user profile. You may change the script to display what you need.
Regards,
Chandana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2015 01:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2015 01:08 AM
Hi Sumeet,
In the UI macro, the below code snippet produces the user name. Instead of using gs.getUserDisplayName() you can change that and add your own script to populate the details.
<j:if test="${!gs.getUser().isXML()}">
<a href="profile.do" title="${gs.getMessage('My Profile')}" aria-label="${gs.getMessage('My Profile')}"><b>${SNC.GlideHTMLSanitizer.sanitize(gs.getUserDisplayName())}</b></a>$[SP]$[SP]|$[SP]
</j:if>
<j:if test="${gs.getUser().isXML()}">
<b>${SNC.GlideHTMLSanitizer.sanitize(gs.getUserDisplayName())}</b>$[SP]$[SP]|$[SP]
</j:if>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2015 01:18 AM
So i try to remove "gs.getUserDisplayName()" from both the places, and i expect this should not show any thing - just the message "Welcome: ".
I am not sure where am i being wrong.
What would you do if you want to change from Display Name to user id?