Partager via


RemoveUser Method

The RemoveUser method of the SPGroup class removes the specified user from the cross-site group.

Parameters

user   A Microsoft.SharePoint.SPUser object that represents the user.

Example

The following code example removes a specified user from every cross-site group in a site collection.

This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.WebControls namespaces.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security