Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SPGroup.ContainsCurrentUser property

Gets a Boolean value that indicates whether the group contains the current user, included either through direct or indirect membership.

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

public bool ContainsCurrentUser { get; }

Property value

Type: System.Boolean
true if the group contains the current user; otherwise, false. For example, if the group object contains a domain group that contains the current user, this property returns true.

The ExplicitlyContainsCurrentUser property does not consider indirect membership.

© 2015 Microsoft