[wp-trac] [WordPress Trac] #49361: Add $reassign to "remove_user_from_blog" - hook.
WordPress Trac
noreply at wordpress.org
Tue Feb 4 17:22:28 UTC 2020
#49361: Add $reassign to "remove_user_from_blog" - hook.
-------------------------------------+-------------------------------------
Reporter: Tivus | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version:
Severity: minor | Keywords: 2nd-opinion needs-patch
Focuses: administration, | dev-feedback
multisite |
-------------------------------------+-------------------------------------
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}}}.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49361>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list