Assigns users to or removes them from a given role.
<HsvSecurityAccess>.AddOrRemoveUsersFromRole2 lRoleID, varabstrUserSIDs, varabAdd
Long (ByVal). The ID of the role. For a list of valid role IDs, see Role ID Constants. To get a role’s ID from its name, use GetRoleID. | |
String array (ByVal). The security identifiers of the users being assigned to or removed from the role. This array has a one-to-one correspondence with the varabAdd argument’s array. For example, the third element of the varabAdd array indicates whether the user identified by the third element of this array is assigned or removed. | |
Boolean array (ByVal). Indicates whether users should be assigned to or removed from the role. For each array element, specify TRUE to assign, FALSE to remove. |
The following subroutine adds the specified users to a given role. The subroutine takes an array of security identifiers and the name of the role.