remove_user_from_blog


remove_user_from_blog ( $user_id, $blog_id = '', $reassign = '' )

Parameters:
  • (int) $user_id ID of the user you're removing.
  • (int) $blog_id ID of the blog you're removing the user from.
  • (string) $reassign Optional. A user to whom to reassign posts.
Returns:
  • (true|WP_Error)
Defined at:
Change Log:
  • M: U

Description

Remove 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, add_new_user_to_blog

Top Google Results

User discussions

wpseek mobile