Skip to Content
avatar image
Former Member

find out the portal user

Hi Expert

I am trying to create a simple application in WebDynpro in that i am trying to find out the all the portal user (not only single user) how can i do this

I have a code to find the single user

?//

public void getPortalUser( )

{

//@@begin getPortalUser()

String LogonID;

try {

IWDClientUser wdUser = WDClientUser.getCurrentUser();

IUser user = wdUser.getSAPUser();

if (user != null) {

IUserAccount Acct = user.getUserAccounts()[0];

if (Acct != null) {

LogonID = Acct.getLogonUid();

} else {

LogonID = "acct null";

}

} else {

LogonID = "user null";

}

wdContext.currentUserDataElement().setUserName(

user.getFirstName() + " " + user.getLastName());

wdContext.currentUserDataElement().setLogonID(

LogonID.toLowerCase());

wdComponentAPI.getMessageManager().reportSuccess(

wdContext.currentUserDataElement().getUserName()

+ " has been logged on as user ID "

+ wdContext.currentUserDataElement().getLogonID());

} catch (Exception e) {

e.printStackTrace();

}

//@@end

}

?///

how to find the all the user

its urgency

thanks & Regards

vijay yewale

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jun 03, 2008 at 05:10 AM

    Hi,

    Try this

    try {

    IUserFactory uf = UMFactory.getUserFactory();

    ISearchResult result = uf.getUniqueIDs();

    while (result.hasNext()) {

    String uniqueid = result.next().toString();

    IUser user = uf.getUser(uniqueid);

    String userid = user.getUniqueName();

    }

    } catch(Exception e) {

    //systemout

    }

    Add comment
    10|10000 characters needed characters exceeded