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:
  • M: U

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.

Related Functions

remove_query_arg, get_users_of_blog, add_user_to_blog, current_user_can_for_blog, restore_current_blog

Top Google Results

User discussions

wpseek mobile