on 06-03-2008 5:39 AM
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
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
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.