on 01-28-2009 11:36 PM
Hi,
How to do a user search based on a UME group using UME API. I could search a user based on user login Id, but how to get all the users who belong to a group with the group unique name as input.
Thanks
Srinivas
Hi
try to use IGroup or IGroupFactory interface.....to get all the details of user in group..
// Get a Group
String groupid1 = "<unique-id of group1>";
IGroup grp = UMFactory.getGroupFactory().getGroup(grpid1);
String grpDesc = grp.getDescription();
IUser user = request.getUser();
if (grp.isUserMember(user.getUniqueID()) {
response.write(user.getFirstName() +
" is a member of " + grpDesc);
}
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try this
boolean b =false;
String name = null;
IGroup grp = UMFactory.getGroupFactory().getGroupByUniqueName("inputValue as GroupName Enterd by User");
if(grp.equals("GroupName")){
Iterator i = grp.getUserMembers(true);
grp.getGroupMembers(true);
for (int a= 0; i.hasNext(); a++){
name = i.next().getClass().getName();
// Once you get your user name then print it on view
}
}
thanks
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.