getGroupByOSID()

The method returns a group with the specified OSID.

Synopsis

public shared_ptr<UserManagementGroup> getGroupByOSID(string osId);

Parameter Description
osID The osID (Operating System ID). See example below.

Return Value

The method returns a group with the specified OSID.

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;
  GroupData = userMgm.getGroupByOSID("S-1-5-21-1934636824-790261252-315576832-1001");
  /* Returns the group for the OSID "S-1-5-21-1934636824-790261252-315576832-1001".
  To test this example, use your own OSID*/
  DebugN("Group:", GroupData.getOSID(), GroupData.getName() );
}

Assignment

User administration

See also

getGroup(), getGroupByName(), getGroupsByAreaId(), getGroupsByUser()