Partilhar via


SPClaimsAuthRoleProvider.IsUserInRole Method

Determines whether the specified user is a member of the specified role.

Namespace:  Microsoft.SharePoint.Administration.Claims
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Overrides Function IsUserInRole ( _
    username As String, _
    roleName As String _
) As Boolean
'Usage
Dim instance As SPClaimsAuthRoleProvider
Dim username As String
Dim roleName As String
Dim returnValue As Boolean

returnValue = instance.IsUserInRole(username, _
    roleName)
public override bool IsUserInRole(
    string username,
    string roleName
)

Parameters

  • username
    Type: System.String

    The user name to search for in the role.

  • roleName
    Type: System.String

    The role name to search for the user.

Return Value

Type: System.Boolean
true if the user is a member of the role.

Remarks

This override determines whether the user is a member of the role in the claims-based role provider that is not an SPClaimsAuthRoleProvider and is used by the current application.

See Also

Reference

SPClaimsAuthRoleProvider Class

SPClaimsAuthRoleProvider Members

Microsoft.SharePoint.Administration.Claims Namespace