remove_user_from_blog

SummerySummery

Remove a user from a blog.

Syntax

remove_user_from_blog( int $user_id, int $blog_id, int $reassign )

DescriptionDescription

Use the ‘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.

ParametersParameters

$user_id

(int) (Required) ID of the user being removed.

$blog_id

(int) (Optional) ID of the blog the user is being removed from. Default 0.

$reassign

(int) (Optional) ID of the user to whom to reassign posts. Default 0.

ReturnReturn

(true|WP_Error) True on success or a WP_Error object if the user doesn't exist.

SourceSource

File: wp-includes/ms-functions.php


			

ChangelogChangelog

Changelog
Version Description
MU (3.0.0) Introduced.
Scroll to Top