Gets a value indicating whether the currently logged-on user is in the specified role.

Namespace: Novalys.VisualGuard.Security.Membership
Assembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2016.0.105.16 (2016.0.105.16)

Syntax

C#
public bool IsUserInRole(
	string roleName
)
Visual Basic
Public Function IsUserInRole ( 
	roleName As String
) As Boolean

Parameters

roleName
Type: System..::..String
The name of the role to search in.

Return Value

Type: Boolean
true if the currently logged-on user is in the specified role; otherwise, false.

Remarks

this method is equivalent to IsInRole(String)

Exceptions

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

-or-

There is no current logged-on user.
System..::..ArgumentExceptionroleName is an empty string or is longer than 64 characters.

See Also