getAllAreas()

The method returns all areas.

Synopsis

public dyn_anytype getAllAreas();

Return Value

All areas.

Errors

Errors are shown in the log viewer.

EXAMPLE

#uses "classes/userManagement/UserManagement"
main(mapping event)
{
  shared_ptr<UserManagement> userMgm = UserManagement::getInstance();
  DebugN(userMgm.getAllAreas());
}

EXAMPLE

#uses "classes/userManagement/UserManagement"
main(mapping event)
{
  shared_ptr<UserManagement> userMgm = UserManagement::getInstance();
  shared_ptr<UserManagementArea> area = new UserManagementArea("area1");
  DebugN(userMgm.addArea(area));
  DebugN(userMgm.saveChanges());
  dyn_anytype allAreas = userMgm.getAllAreas();
  for (int i =1; i<=dynlen(allAreas); i++)
  DebugN("Get ID:", allAreas[i].getId(),allAreas[i].getName());
  /* Returns the area IDs and names */
}

Assignment

User administration

See also

getArea(), getAllGroups(), getAreaByName()