removeGroup()

The method deletes a user group.

Synopsis

public void removeGroup(uint groupId);

Parameter Description
groupId The group ID of the group that is deleted.

Return Value

-

Errors

Errors are shown in the log viewer.

EXAMPLE

#uses "classes/userManagement/UserManagement"
main(mapping event)
{
  unsigned groupID = 5;
  shared_ptr<UserManagement> userMgm = UserManagement::getInstance();
  shared_ptr<UserManagementGroup> removedGroup = new UserManagementGroup("WinCCOATest");
  removedGroup.removeGroup(groupID);
  /*Removes the group with the ID 5*/
  DebugN(userMgm.saveChanges());
  dyn_anytype allGroups = userMgm.getAllGroups();
  for (int i =1; i<dynlen(allGroups); i++)
  {
    userMgm.getArea(allGroups[i].getId());
    DebugN(allGroups[i].getName());
  }
}

Assignment

User administration

See also

setPermissionDescription()