SPClaimProviderManager.ConvertSPUserToClaim method
Converts a user into an identity claim.
Namespace: Microsoft.SharePoint.Administration.Claims
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Function ConvertSPUserToClaim ( _
user As SPUser _
) As SPClaim
'Usage
Dim instance As SPClaimProviderManager
Dim user As SPUser
Dim returnValue As SPClaim
returnValue = instance.ConvertSPUserToClaim(user)
public SPClaim ConvertSPUserToClaim(
SPUser user
)
Parameters
user
Type: Microsoft.SharePoint.SPUserThe SPUser user to convert. It may be a user, security group, or distribution list.
Return value
Type: Microsoft.SharePoint.Administration.Claims.SPClaim
The claim representing the identity of a given SPUser.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when user is a null reference (Nothing in Visual Basic). |
ArgumentException | Thrown when the LoginName is empty or a null reference (Nothing in Visual Basic). |