Condividi tramite


SPGroup.ExplicitlyContainsCurrentUser Property

Gets a Boolean value that indicates whether the current user has been added explicitly as a direct member of the SharePoint Foundation group, as opposed to indirect membership through a directory group.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public ReadOnly Property ExplicitlyContainsCurrentUser As Boolean
    Get
'Usage
Dim instance As SPGroup
Dim value As Boolean

value = instance.ExplicitlyContainsCurrentUser
public bool ExplicitlyContainsCurrentUser { get; }

Property Value

Type: System.Boolean
true if the current user is a direct member of the group; otherwise, false. If the group object contains a domain group that includes the current user but the group object does not directly include the user, this property returns false.

Remarks

The ContainsCurrentUser property considers both direct and indirect membership.

See Also

Reference

SPGroup Class

SPGroup Members

Microsoft.SharePoint Namespace