Last login time display on Next UI Experience in San Diego

George Chen
Tera Expert

Hi Community gurus, 

 

My organisation are upgrading from Quebec to San Diego with New UI Experience.  At this stage we are exploring the potential options to transfer our custom design of Last Login time which in Quebec, the last login time is injected by a Global UI Script (as can be seen below)

find_real_file.png

 

We know this approach was not ideal but it has worked as we expected, the followings are UI Script excerpt:

var ga = new GlideAjax('xxx_UserUtils');
ga.addParam('sysparm_name', 'getLastLoginTime');
ga.getXML(parseLastLoginTime);

function parseLastLoginTime(response) {
/* skipping scripts */

if (elementUser) {
for (var i=0 ;i < elementUser.length; i++)
if (elementUser[i].innerHTML.indexOf('Last Login') == -1 && answer != null && answer != '')
elementUser[i].innerHTML += '(Last Login: ' + answer + ')';
}

/* skipping scripts */

 

 

With San Diego, we are exploring for OOB approach to replace the UI script, and one option found is Banner Announcement, however, with this option, this appears a global configurations (well, it can be configured by specific group/role, logged-in users, etc.) but it does not seem straightforward to display individual user's last login time. 

The following screenshot is a quick display of this approach:

find_real_file.png

This approach might once again, needs a DOM injection to populate the date time against each user's sys_user last_login field. 

 

Apart from banner, I am also seeking other possibilities, but would like to seek your input for advice.

 

Potential options  in San Diego vs Last Login time

  • Default Landing Page
  • https://docs.servicenow.com/csh?version=latest&topicname=configure-per-user-ui16-landing-page-in-next-experience
  • Banner Announcement
  • https://docs.servicenow.com/bundle/sandiego-platform-user-interface/page/administer/navigation-and-ui/concept/next-experience-banner-announcements.html#next-experience-banner-announcements
  • Banner Announcement + Global UI Script possible?
  • Dashboard?
  • UI Builder
  • https://docs.servicenow.com/bundle/sandiego-application-development/page/administer/ui-builder/task/ui-builder-quick-start.html
  • Notification?
  • DOM Manipulation? (Least preferred but not exlcuded)

 

Your attention and advice would be appreciated. 

 

Best wishes, 

George 

4 REPLIES 4

Allen Andreas
Administrator
Administrator

Hello,

If you don't mind explaining, what is the point of adding the last login to your name showing in the header? That date/time gets update as you're logging in and so it's going to be relatively recent unless you have a long period before you time someone out, etc.

Just curious about the use case here.

Please mark reply as Helpful, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi Allen, 

For our organisation culture this display of last login time can remind the end users that last login time the system has in record, and if the users did not log in at the time in record, they may raise with a ticket for investigation.  I know this may sound like alarmist but it has been set like that for a long while. 

Cheers

frankwall-windw
Tera Contributor

Also FYI the DOD for example require it for Audit and Security purposes.

 

Hi,

I don't believe the DOD requires your last login to be visible right next to your name per the requirement spoken about here. By default, the last login is tracked and is captured on the user record, just not displayed right next to the user's name in the header menu.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!