Skip to Content
0
Former Member
Mar 31, 2009 at 04:59 AM

Unable to read user name

21 Views

Hi,

I have used the following code to read the user who has logged into the portal. However my WDJ application fails to return the user name for one particular user. Any suggestions ?


		IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
		IUser sapUser = wdClientUser.getSAPUser();
		if (sapUser != null) 
		{
			IUserAccount[] acct = sapUser.getUserAccounts();
			if (acct[0] != null) 
			{
				String strUserName = acct[0].getDisplayName();
				strUserName=strUserName.toUpperCase();
				userID = strUserName;				
							
			}
		}