Adds the specified users to the specified roles.
Namespace: Novalys.VisualGuard.Security.WebFormAssembly: Novalys.VisualGuard.Security.WebForm (in Novalys.VisualGuard.Security.WebForm.dll) Version: 2017.0.101.17 (2017.0.101.17)
Syntax
C# |
---|
public override void AddUsersToRoles( string[] usernames, string[] roleNames ) |
Visual Basic |
---|
Public Overrides Sub AddUsersToRoles ( usernames As String(), roleNames As String() ) |
Parameters
- usernames
- Type: array<System..::..String>[]()[][]
A string array of user names to add to the specified roles.
- roleNames
- Type: array<System..::..String>[]()[][]
A string array of roles to add the specified user name to.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | One of the roles in roleNames is null.
-or- One of the users in usernames is null. |
System..::..ArgumentException | One of the roles in roleNames is an empty string or contains a comma (,).
-or- roleNames contains a duplicate element.-or-usernames contains a duplicate element. |