SPWeb.IsCurrentUserMemberOfGroup method

Gets whether the current user is a member of the specified group.

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


Public Function IsCurrentUserMemberOfGroup ( _
    groupId As Integer _
) As Boolean
Dim instance As SPWeb
Dim groupId As Integer
Dim returnValue As Boolean

returnValue = instance.IsCurrentUserMemberOfGroup(groupId)
public bool IsCurrentUserMemberOfGroup(
    int groupId


Return value

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

See also


SPWeb class

SPWeb members

Microsoft.SharePoint namespace