다음을 통해 공유


SPUtility.ResolvePrincipal Method (SPWeb, String, SPPrincipalType, SPPrincipalSource, SPUserCollection, Boolean)

Resolves principal information into an SPPrincipalInfo object.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)> _
<ClientCallableAttribute> _
<ClientCallableExceptionConstraintAttribute(FixedId := "b", ErrorType := GetType(UnauthorizedAccessException),  _
    Condition := "User does not have permission to Browse UserInfo list.")> _
Public Shared Function ResolvePrincipal ( _
    web As SPWeb, _
    input As String, _
    scopes As SPPrincipalType, _
    sources As SPPrincipalSource, _
    usersContainer As SPUserCollection, _
    inputIsEmailOnly As Boolean _
) As SPPrincipalInfo
'Usage
Dim web As SPWeb
Dim input As String
Dim scopes As SPPrincipalType
Dim sources As SPPrincipalSource
Dim usersContainer As SPUserCollection
Dim inputIsEmailOnly As Boolean
Dim returnValue As SPPrincipalInfo

returnValue = SPUtility.ResolvePrincipal(web, _
    input, scopes, sources, usersContainer, _
    inputIsEmailOnly)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
[ClientCallableAttribute]
[ClientCallableExceptionConstraintAttribute(FixedId = "b", ErrorType = typeof(UnauthorizedAccessException), 
    Condition = "User does not have permission to Browse UserInfo list.")]
public static SPPrincipalInfo ResolvePrincipal(
    SPWeb web,
    string input,
    SPPrincipalType scopes,
    SPPrincipalSource sources,
    SPUserCollection usersContainer,
    bool inputIsEmailOnly
)

Parameters

  • input
    Type: System.String

    The display name, e-mail address, or login name that identifies the principal.

  • inputIsEmailOnly
    Type: System.Boolean

    A Boolean value that indicates the fields to be matched during the search for the principal. A value of true indicates that the match can be made by using only the e-mail address of a principal. A value of false indicates that a match can be made by using the any one of the display name, the e-mail address, or the login name of a principal.

Return Value

Type: Microsoft.SharePoint.Utilities.SPPrincipalInfo
An SPPrincipalInfo object that represents principal information.

See Also

Reference

SPUtility Class

SPUtility Members

ResolvePrincipal Overload

Microsoft.SharePoint.Utilities Namespace