on 11-01-2007 5:26 AM
Hi all,
in my application i want to get all possible users present in the PORTAL-EP Server
and set them into the drop down.
is there need to login in the portal as a admin or other user to get the all users present in the Server.
Regards,
Deepak
Hi,
Check this link
Regards,
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi! Deepak,
you can use UME API to get all the users of EP in WebDynpro appl.
Herewith i am giving you the UME API link --
<a href="http://help.sap.com/javadocs/NW04/current/um/index.html">http://help.sap.com/javadocs/NW04/current/um/index.html</a>
i am giving the code also to get all the users from LDAP.
IPublic<ComponentName>.IUserIDElement userIDNodeElement = null;
IUserAccountFactory accountFact = UMFactory.getUserAccountFactory();
MessageManager msgMgr = (MessageManager)wdThis.wdGetAPI().getComponent().getMessageManager();
try {
IUserAccountSearchFilter accountSearchFilter = accountFact.getUserAccountSearchFilter();
accountSearchFilter.setLogonUid("*",ISearchAttribute.LIKE_OPERATOR,false);
ISearchResult srchRslt = accountFact.search(accountSearchFilter);
while(srchRslt.hasNext()) {
userIDNodeElement = wdContext.createUserIDElement(); String uniqueID = (String)srchRslt.next();
IUserAccount userAccount = accountFact.getUserAccount(uniqueID);
String LogonUid = userAccount.getLogonUid();
userIDNodeElement.setCtx_UserID(LogonUid);
wdContext.nodeUserID().addElement(userIDNodeElement);
} catch(Exception exc) {
msgMgr.reportWarning(umException.toString());
}
regards,
Mithilehwar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Deepak
Try this code.
IPortalComponentResponse response = (IPortalComponentResponse) this.getResponse();
try {
IUserFactory userFactory = UMFactory.getUserFactory();
IUserSearchFilter searchFilter = userFactory.getUserSearchFilter();
ISearchResult searchResult = userFactory.searchUsers(searchFilter);
while (searchResult.hasNext()) {
String uniqueid = (String) searchResult.next();
IUser user = userFactory.getUser(uniqueid);
response.write(user.getUniqueName() + "<br>");
}
} catch (Exception e) {
response.write(e.getMessage());
}
You can also use this code
IGroup group_Portal_Everyone = UMFactory.getGroupFactory().getGroupByUniqueName("Everyone");
Users_Portal_Everyone = group_Portal_Everyone.getUserMembers(true);
Thanks and regards
Sivaprasath
Message was edited by:
Armin Reichert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.