3.1.5.83 proc_SecRemoveUserFromSiteGroup
The proc_SecRemoveUserFromSiteGroup stored procedure is called to remove a user from a sitegroup in a site collection. proc_SecRemoveUserFromSiteGroup is defined using T-SQL syntax, as follows.
-
PROCEDURE proc_SecRemoveUserFromSiteGroup ( @SiteId uniqueidentifier ,@GroupId int ,@UserIDToBeDeleted int ,@UserID int ,@SiteAdmin bit );
@SiteId: The Site Collection Identifier (section 2.2.1.17) of the site collection that will be queried for the requested site group.
@GroupId: The identifier for the site group that the user specified by @UserIDToBeDeleted is to be removed from.
@UserIDToBeDeleted: The User Identifier (section 2.2.1.24) for the user to remove from the specified sitegroup. If @UserId and @UserIdToBeDeleted refer to the same user, and the site group permits users to remove themselves from site group membership, then the user specified by @UserIdToBeDeleted MUST be removed from the site group.
@UserID: The User Identifier for the current user who is removing the user to be deleted from the specified sitegroup. If @UserId and @UserIdToBeDeleted refer to the same user and the site group permits site group members to edit membership, then the user specified by @UserIdToBeDeleted is removed from the sitegroup.
@SiteAdmin: A bit flag specifying whether the user specified by @UserID is a site collection administrator of the site collection specified by @SiteId. If @SiteAdmin is set to 1, then proc_SecRemoveUserFromSiteGroup MUST remove the user specified by @UserIDToBeDeleted from the sitegroup.
Return Values: The proc_SecRemoveUserFromSiteGroup stored procedure MUST return one of the following integer return codes.
Value |
Description |
---|---|
0 |
Successful execution. |
5 |
The current user has insufficient authority to remove the user from the site group. |
Result Sets: The proc_SecRemoveUserFromSiteGroup stored procedure MUST NOT return any result set.