Gets a value indicating whether the specified user is in the specified role.
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 bool IsUserInRole( string username, string roleName ) |
Visual Basic |
---|
Public Overrides Function IsUserInRole ( username As String, roleName As String ) As Boolean |
Parameters
- username
- Type: System..::..String
The name of the user to search for.
- roleName
- Type: System..::..String
The name of the role to search in.
Return Value
Type: Booleantrue if the specified user is in the specified role; otherwise, false.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | roleName is null.
-or- username is null. |
System..::..ArgumentException | roleName is an empty string.
-or- username is an empty string. |