#49361 closed enhancement (fixed)
Add $reassign to "remove_user_from_blog" - hook.
Reported by: | Tivus | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.4 | Priority: | normal |
Severity: | minor | Version: | |
Component: | Users | Keywords: | 2nd-opinion needs-patch dev-feedback |
Focuses: | administration, multisite | Cc: |
Description
When a user is deleted in a multisite all her content can be reassigned to another user. The function remove_user_from_blog is triggered with three parameters ( $user_id
, $blog_id = ''
, $reassign = ''
).
The action "remove_user_from_blog" is triggered a few lines below but does not pass the value of reassign:
do_action( 'remove_user_from_blog', $user_id, $blog_id );
For more context: https://github.com/WordPress/WordPress/blob/master/wp-includes/ms-functions.php#L254
Is there any reason not to add $reassign
to the action?
But why?
We are running a large network and use reference tables to keep track of user's posts. When posts are reassigned, those tables should also be updated. Currently it would be really difficult to access the value of $reassign
.
In 47173: