This documentation is archived and is not being maintained.

SPWeb.IsCurrentUserMemberOfGroup Method

Windows SharePoint Services 3

Returns a Boolean value that specifies whether the current user is a member of the specified group.

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

public bool IsCurrentUserMemberOfGroup(
	int groupId


Type: System.Int32
A 32-bit integer that specifies the group identifier (ID).

Return Value

Type: System.Boolean
true if the user is a member of the group; otherwise, false.