id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 8175,Calling `wp_delete_user()` on multisite should not trigger data deletion,boonebgorges,boonebgorges,"On non-multisite, `wp_delete_user()` does what it says: it deletes the user from the database (and reassigns post authorship). On multisite, the correct way to remove a user from the system altogether is to call `wpmu_delete_user()`. When calling `wp_delete_user()` on *multisite*, the function does the following: 1. Reassigns post authorship 2. Calls `remove_user_from_blog()` As such, the Multisite semantics of `wp_delete_user()` are, arguably, incorrect. See https://core.trac.wordpress.org/ticket/12720, https://core.trac.wordpress.org/ticket/32796 In many places, BuddyPress performs data cleanup/deletion on user delete. This generally takes the form seen at https://buddypress.trac.wordpress.org/browser/tags/5.0.0/src/bp-xprofile/bp-xprofile-functions.php?marks=895,896#L883: hooking the same function to the `wpmu_delete_user` and `delete_user` hooks. This behavior feels quite incorrect in the case of Multisite `wp_delete_user()`. Developers who use `wp_delete_user()` to remove a user from a Multisite subsite would not, presumably, expect the user's BuddyPress data to be deleted. BP data should only be deleted when the user account is removed from the system altogether.",defect (bug),closed,normal,6.0.0,Members,,normal,fixed,2nd-opinion has-patch dev-feedback,