[wp-trac] [WordPress Trac] #17905: Multisite doesn't delete a user's posts/links upon removal
WordPress Trac
noreply at wordpress.org
Fri Apr 3 18:28:36 UTC 2020
#17905: Multisite doesn't delete a user's posts/links upon removal
-------------------------------------+-------------------------
Reporter: duck_ | Owner: jeremyfelt
Type: defect (bug) | Status: assigned
Priority: normal | Milestone:
Component: Users | Version: 3.0
Severity: normal | Resolution:
Keywords: needs-refresh has-patch | Focuses: multisite
-------------------------------------+-------------------------
Changes (by clarinetlord):
* keywords: has-patch => needs-refresh has-patch
Comment:
I'd like to resurrect this 9-year-old (!) issue, as this defect surfaced
recently for our team. I'm supplying a new patch which is made from the
current trunk and is narrower in scope than the previous patch. To
summarize the OP, what happens is the user about to be deleted is
currently removed from all sites whether or not their content is being
deleted or reassigned. Because they are removed from all sites, the
subsequent call to `wpmu_delete_user()` does not detect any role for the
user on any sites and therefore does not remove any authored posts. Since
`wpmu_delete_user()` internally calls `remove_user_from_blog()`, it's
counterproductive to call it prematurely in the main process and
incorrectly orphans all of that user's posts.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/17905#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list