getSavedUsersByGroupId()

The method returns all users that belong to the group with the specified group ID.

Synopsis

public dyn_anytype getSavedUsersByGroupId(int groupId);

Parameter Description
groupId The group ID of the user group for which the users that belong to the group are returned.

Return Value

Users that belong to the group with the specified group ID.

Errors

Errors are shown in the log viewer.

EXAMPLE

#uses "classes/userManagement/UserManagement"
 main(mapping event)
{
  shared_ptr<UserManagement> userMgm = UserManagement::getInstance();
  int groupID = 1;
  dyn_anytype savedUsers = userMgm.getSavedUsersByGroupId(groupID);
  /* Returns the saved users for the group para */
  for (int i =1; i<= dynlen(savedUsers); i++)
  DebugN("Saved users of the group para :", savedUsers[i].getName());
}

Assignment

User administration

See also

getUser(), getAllSavedUsers()