getId()

The method returns the group, user or area ID.

Synopsis

public unsigned getId();

Return Value

The group, user or area ID.

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 outputs the name of the group and the ID */
  for (int i =1; i<=dynlen(allGroups); i++)
  {
    GroupData = userMgm.getGroup(allGroups[i].getId());
    DebugN("Groups:", GroupData.getName(),GroupData.getId() );
  }
}

Assignment

User administration

See also

setPermissionDescription()