remove_user_from_blog
remove_user_from_blog ( $user_id, $blog_id = 0, $reassign = 0 )
Parameters:- (int) user_id ID of the user being removed.
- (int) blog_id Optional. ID of the blog the user is being removed from. Default 0.
- (int) reassign Optional. ID of the user to whom to reassign posts. Default 0.
Returns:- (true|WP_Error) True on success or a WP_Error object if the user doesn't exist.
Defined at:Change Log: - Introduced in WordPress: —
- Deprecated in WordPress: —
Description
Removes a user from a blog.Use the {@see 'remove_user_from_blog'} action to fire an event when
users are removed from a blog.
Accepts an optional `$reassign` parameter, if you want to
reassign the user's blog posts to another user upon removal.