getArea()

The method returns an area.

Synopsis

public shared_ptr<UserManagementArea> getArea(long id) synchronized (instance);

Parameter Description
Id The area ID - see example below.

Return Value

An area.

Errors

Errors are shown in the log viewer.

EXAMPLE

#uses "classes/userManagement/UserManagement"
main(mapping event)
{
  shared_ptr<UserManagement> userMgm = UserManagement::getInstance();
  dyn_anytype allAreas = userMgm.getAllAreas();
  for (int i =1; i<=dynlen(allAreas); i++)
  {
    userMgm.getArea(allAreas[i].getId()); /*Returns the areas */
    DebugN(allAreas[i].getName()); /*Outputs the area names */
  }
}

Assignment

User administration

See also

getAreaByName(), getAllAreas(), addArea()