Skip to Content
0
Former Member
Oct 17, 2006 at 02:09 PM

User from portal

28 Views

Hi,

I want to get the user ID details. I used this code and it provides me with the user id: name.surname

But from this I want to get the alias what shoud i add

try

{

IWDClientUser wdUser = WDClientUser.getCurrentUser();

IUser user = wdUser.getSAPUser();

if (user != null)

{

IUserAccount[] acct = user.getUserAccounts();

if(acct[0] != null)

{

String strUserid = acct[0].getLogonUid();

String strPasswd = acct[0].getHashedPassword();

IWDLabel myLabel = (IWDLabel)view.getElement("testLabel");

myLabel.setText(strUserid);

}

}

}

catch (Exception ex) {

ex.printStackTrace();

}