3.1.5.102 proc_SecRemoveUserFromSiteGroup
The proc_SecRemoveUserFromSiteGroup stored procedure is invoked to remove a user from a site group in a site collection.
-
PROCEDURE proc_SecRemoveUserFromSiteGroup( @SiteId uniqueidentifier, @GroupId int, @UserIDToBeDeleted int, @UserID int, @SiteAdmin bit, @BelongsToGroup bit, @GroupOwnerId int, @CurrentUserIsOwner bit );
@SiteId: The Site Collection Identifier (section 2.2.1.9) of the site collection that will be queried for the requested Group.
@GroupId: The Site Group Identifier (section 2.2.1.10) for the site group that the User specified by @UserIDToBeDeleted is to be removed from.
@UserIDToBeDeleted: The User Identifier (section 2.2.1.13) for the User to remove from the specified site group. If @UserId and @UserIdToBeDeleted refer to the same User, and the site group permits users to remove themselves from site group, membership, the User specified by @UserIdToBeDeleted MUST be removed from the group.
@UserID: The User Identifier for the current user who is removing the User to be deleted from the specified site group. If @UserId and @UserIdToBeDeleted refer to the same User, and the site group Site Group permits site group members to edit membership, the User specified by @UserIdToBeDeleted is removed from the group.
@SiteAdmin: A bit flag specifying whether the User specified by @UserID is a site administrator of the site specified by @SiteId. If @SiteAdmin is set to "1", proc_SecRemoveUserFromSiteGroup MUST remove the User specified by @UserIDToBeDeleted from the site group.
@BelongsToGroup: A bit flag specifying whether the User specified by @UserID is a member of the site group specified by @GroupId. If @BelongsToGroup is set to "1" and the site group permits site group members to edit membership, and the current user specified in @UserID is a member of the site group, proc_SecRemoveUserFromSiteGroup MUST remove the User specified by @UserIDToBeDeleted from the site group.
@GroupOwnerId: The User Identifier or Site Group Identifier of the site group owner specified by @GroupId. @GroupOwnerId MUST be set to the User Identifier of the current user, or, if @CurrentUserIsOwner is set to "1," to the Site Group Identifier of a site group which includes the current user. If @CurrentUserIsOwner is set to "0", @GroupOwnerId MUST be ignored.
@CurrentUserIsOwner: A bit flag specifying that the User specified by @GroupOwnerId is an owner of the site group specified by @GroupId. If @CurrentUserIsOwner is set to "1" and @GroupOwnerId contains either the User Identifier of the owner of the site group, or the Site Group Identifier of a site group which includes the current user, proc_SecRemoveUserFromSiteGroup MUST remove the User from the site group.
Return Values: The proc_SecRemoveUserFromSiteGroup stored procedure returns an integer return code which MUST be one of the values in the following table.
Value |
Description |
---|---|
0 |
Successful execution. |
5 |
The current user has insufficient authority to remove the User from the site group. |
The proc_SecRemoveUserFromSiteGroup stored procedure MUST NOT return any result sets.