getGroupByName()

The method returns the user groups for the specified user group.

Synopsis

public shared_ptr<UserManagementGroup> getGroupByName(string name);

Parameter Description
name The user group name - see example below.

Return Value

The user groups for the specified user group.

Errors

Errors are shown in the log viewer.

EXAMPLE

main(mapping event)
{
  shared_ptr<UserManagement> userMgm  = UserManagement::getInstance();
  shared_ptr<UserManagementGroup> GroupData;
  dyn_anytype allGroups = userMgm.getAllGroups();
  /*Returns all groups and then returns the groups by name. The group names and IDs are output */
  for (int i =1; i<=dynlen(allGroups); i++)
  {
    anytype group = allGroups[i];
    GroupData = userMgm.getGroupByName( group.getName());
    DebugN("Get group:", group.getName(),group.getId() );
  }
}

Assignment

User administration

See also

getGroup(), getGroupsByAreaId(), getGroupsByUser()