getGroupsByAreaId()

The method returns groups to which the area with the specified area ID was assigned to.

Synopsis

public dyn_anytype getGroupsByAreaId(int areaId);

Parameter Description
areaId The area ID. See example below.

Return Value

Groups to which the area with the specified area ID was assigned to.

Errors

Errors are shown in the log viewer.

EXAMPLE

#uses "classes/userManagement/UserManagement"
main(mapping event)
{
  shared_ptr<UserManagement> userMgm = UserManagement::getInstance();
  int areaID = 1;
  dyn_anytype groupInfo = userMgm.getGroupsByAreaId(areaID);
  /* The method returns the groups to which the area with the ID 1 was assigned */
  for (int i =1; i<=dynlen(groupInfo); i++)
  {
    DebugN(groupInfo[i].getName());
    DebugN(groupInfo[i].getId());
  }
}

Assignment

User administration

See also

getGroupByName(), getGroupByOSID()