Checks if the currently active user is a member of any of the roles with IDs in the array that is passedas a parameter.

Namespace: MonoSoftware.MonoX.Utilities
Assembly: MonoX (in MonoX.dll) Version: 5.1.40.5065 (5.1.40.5065)

Syntax

C#
public static bool IsUserInRoles(
	string username,
	Guid[] roles
)
Visual Basic
Public Shared Function IsUserInRoles ( 
	username As String,
	roles As Guid()
) As Boolean
Visual C++
public:
static bool IsUserInRoles(
	String^ username, 
	array<Guid>^ roles
)
F#
static member IsUserInRoles : 
        username : string * 
        roles : Guid[] -> bool 

Parameters

username
Type: System..::..String
Username
roles
Type: array<System..::..Guid>[]()[][]
Roles array

Return Value

Type: Boolean
True if the user is in one of the roles, false if not

See Also