do_action( 'remove_user_from_blog', int $user_id, int $blog_id, int $reassign )
- Since
- MU (3.0.0), 5.4.0
Fires before a user is removed from a site.
Compatibility
- WordPress
- since 5.4.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$user_idint- ID of the user being removed.
$blog_idint- ID of the blog the user is being removed from.
$reassignint- ID of the user to whom to reassign posts.
Where this hook fires · 1
wp-includes/ms-functions.php:257remove_user_from_blog()
Source code
* @since 5.4.0 Added the `$reassign` parameter. * * @param int $user_id ID of the user being removed. * @param int $blog_id ID of the blog the user is being removed from. * @param int $reassign ID of the user to whom to reassign posts. */ do_action( 'remove_user_from_blog', $user_id, $blog_id, $reassign ); /* * If being removed from the primary blog, set a new primary * if the user is assigned to multiple blogs. */ $primary_blog = (int) get_user_meta( $user_id, 'primary_blog', true );Changelog
Introduced in 5.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
5.4.0
Added the
$reassign parameter.from the docblockMU (3.0.0)
MU (3.0.0)from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.