getDomain()

The method returns the domain of the specified user group.

Synopsis

public string getDomain();

Return Value

The domain of the specified user group.

Errors

Errors are shown in the log viewer.

EXAMPLE

#uses "classes/userManagement/UserManagement"
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++)
  {
    GroupData = userMgm.getGroupByName(allGroups[i].getName());
    DebugN("Group name:", GroupData.getName(),"IDs:", GroupData.getGroupIds() );
    DebugN("Domain:", GroupData.getDomain() );
    /* Outputs the domain */
  }
}

Assignment

User administration

See also