on 06-04-2010 2:19 PM
Hi all,
I want to retrieve the list of users mapped to a portal group.
Thanks
Supriya.
Hi,
We can use the UME API's to get the desired output.
Do the following -
1)Get the Group by UMFactory.getGroupFactory.getGroupbyUniquename(); This will rteturn the object of IGroup
2)we have a method called getGroupMembers in the IGroup Interface . <IGroupObject>.getGroupMember()
3)The above method will return the iterator and while iterating the iterator object in a loop we can type cast the Object to IUser.
4)From the IUSer interface we can get the Uniquename or display name of the user.
Thanks,
Raju Bonagiri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
like this:
public static ArrayList getUserMembersOfGroup(String groupName) throws UMException {
ArrayList users = new ArrayList();
if (groupName != null) {
IGroup group = UMFactory.getGroupFactory().getGroup(groupName);
if (group != null) {
Iterator iterator = group.getUserMembers(true);
while(iterator.hasNext()) {
String uniqueId = (String) iterator.next();
IUser user = UMFactory.getUserFactory().getUser(uniqueId);
if (!users.contains(user.getName())) {
users.add(user.getName());
}
}
}
}
return users;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Supriya
Use UME API for retrieve the list of users associated with portal group.
Hope it helps
Regards
Arun
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.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.