[wp-trac] [WordPress Trac] #34993: Deleting a user no longer asks what to do with their content

WordPress Trac noreply at wordpress.org
Wed Dec 23 03:29:10 UTC 2015


#34993: Deleting a user no longer asks what to do with their content
------------------------------+-----------------------------
 Reporter:  beerallica        |       Owner:  dd32
     Type:  defect (bug)      |      Status:  accepted
 Priority:  normal            |   Milestone:  4.4.1
Component:  Users             |     Version:  4.4
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:  administration
------------------------------+-----------------------------
Changes (by dd32):

 * owner:  netweb => dd32
 * status:  assigned => accepted


Comment:

 A few small things:
  * There's no need to do the `GROUP BY`, and we don't even need the
 `COUNT(*)`. We just want to know if any of them have posts. It's a lot
 more efficient to simply do `SELECT ID FROM {$wpdb->posts} WHERE
 post_author IN(1,2,3) LIMIT 1` as it'll return the truthy value as soon as
 it finds any content.
  * "Content" in the realm of `wp_delete_user()` is also Links/Bookmarks,
 so we should also check that, [34000] didn't take that into consideration.
 Better to take that into consideration than have a users old content go
 missing.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34993#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list