Gets a value indicating whether the specified user is in the specified role.

Namespace: Novalys.VisualGuard.Security.WebForm
Assembly: 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: Boolean
true if the specified user is in the specified role; otherwise, false.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionroleName is null.

-or-

username is null.
System..::..ArgumentExceptionroleName is an empty string.

-or-

username is an empty string.

See Also