cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with applet.getUserName() to fetch currently logged userid

Former Member
0 Kudos

Hi,

I am using applet.getPropertyValue("IllumLoginName") to fetch the currently logged in user. But in some places there is already an MII function used applet.getUserName() to fetch current logged in UserID. But the problem is when a user logs in the MII with a UserID : USERA and does some operation and logsoff and he logs in as a new user with ID : USERB, but MII fetches the USERA instead of USERB. After some investigations we found that it is because we are using getUserName() function of applet which is fetching the previously logged in userid.

Please let me know what is the differece between these 2 functions.

Browser : IE7+

MII Version : 11.5

Java version: 1.5.0_06

Thanks in Advance,

Raj.

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Kudos

As you have found the .getUserName is only good for the initial user, so you must use the .getPropertyValue approach.

The applets only 'log themselves in' once, so the getPropertyValue is the true check for the UME session user.

You could also use this approach in an irpt page and request it with javascript as well:

<input type="hidden" id="WhoDat" value="{IllumLoginName}">

Regards,

Jeremy

0 Kudos

Raj,

If you use Jeremy's suggested approach be sure that your page file extension is .irpt otherwise it will not work. I agree that the applet.getUsername() should work but v11.5 is not supported anoymore and will not be patch. As a result you can either do the following upgrade your version or modify your content.

Hope this helps.

Sam

Answers (0)