SPClaimsAuthRoleProvider.GetUsersInRole method (SPWeb, String, Int32, Boolean)
Gets a list of the users in the specified role for the application represented by the ApplicationName property.
Namespace: Microsoft.SharePoint.Administration.Claims
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Overridable Function GetUsersInRole ( _
web As SPWeb, _
roleName As String, _
maxCount As Integer, _
<OutAttribute> ByRef reachedMaxCount As Boolean _
) As SPPrincipalInfo()
'Usage
Dim instance As SPClaimsAuthRoleProvider
Dim web As SPWeb
Dim roleName As String
Dim maxCount As Integer
Dim reachedMaxCount As Boolean
Dim returnValue As SPPrincipalInfo()
returnValue = instance.GetUsersInRole(web, _
roleName, maxCount, reachedMaxCount)
public virtual SPPrincipalInfo[] GetUsersInRole(
SPWeb web,
string roleName,
int maxCount,
out bool reachedMaxCount
)
Parameters
web
Type: Microsoft.SharePoint.SPWebThe site associated with role.
roleName
Type: System.StringThe name of the role to search.
maxCount
Type: System.Int32The maximum number of users to retrieve.
reachedMaxCount
Type: System.BooleanDetermines whether the number of the elements in the result reached the maximum number. This parameter is passed uninitialized.
Return value
Type: []
The names of the users in the specified role.
Remarks
This override gets the users in the claims-based role provider that is not an SPClaimsAuthRoleProvider and is used by the current application.
See also
Reference
SPClaimsAuthRoleProvider class