Skip to Content
author's profile photo Former Member
Former Member

User from portal


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



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");





catch (Exception ex) {



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Oct 18, 2006 at 05:18 AM


    First you need to add the security.api.jar file.


    1. Right click on project name >properties>java buildpath>Libraries>add variables>ECLIPS HOME>Extend> Plugins->>lib> -->order and export.

    Write the below code in wddoinit()method for getting the portal logon user details .

    Create one or two context elements and bind it with UI elements.

    try {

    String firstName = WDClientUser.getCurrentUser().getFirstName();

    String lastName = WDClientUser.getCurrentUser().getLastName();

    String name = firstName + " " + lastName;


    ISearchResult rst = UMFactory.getUserFactory().getUniqueIDs();

    IUser iuser = null;

    while (rst.hasNext()) {

    iuser = UMFactory.getUserFactory().getUser(;

    if ((firstName.equalsIgnoreCase(iuser.getFirstName())) & (lastName.equalsIgnoreCase(iuser.getLastName()))) {

    String emailId = iuser.getEmail();




    } catch (WDUMException e) {


    } catch (UMException ue) {







    Pls reward points for useful information

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 17, 2006 at 02:49 PM

    Hi Eoin,


    What is alias? I can only see IPrincipal.getDisplayName wich is <i>Gets the principal's display name. Depending on the implementation, this might be an alternative (<b>alias</b>) name</i>.

    Best regards, Maksim Rashchynski.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.