WPDev.one
Core Function
View Source on Trac ↗

remove_user_from_blog()

remove_user_from_blog( mixed $user_id, mixed $blog_id = 0, mixed $reassign = 0 )

Removes a user from a blog.

Parameters 1 required

Name / Type Description
$user_id
int

ID of the user being removed.

Required
$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.

Return Value

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

Function Information

Since Version
MU (3.0.0)
Source File
wp-includes/ms-functions.php
Advertisement