[wp-trac] [WordPress Trac] #16358: Menu items get deleted with the user who created them

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 24 08:17:06 UTC 2011


#16358: Menu items get deleted with the user who created them
--------------------------+-----------------------------
 Reporter:  nacin         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  high          |  Milestone:  Awaiting Review
Component:  Menus         |    Version:  3.0
 Severity:  critical      |   Keywords:
--------------------------+-----------------------------
 Say a user edits a nav menu or two, adding some menu items. Then, said
 user gets deleted. Rut roh:

 `SELECT ID FROM $wpdb->posts WHERE post_author = %d`

 The menu items were tied to them, therefore they are deleted.

 We need to ensure that wp_delete_user() doesn't touch nav menu items.

 This has repercussions for any post type that doesn't care about authors.
 Tempted to actually check, post_type_supports(), which is typically
 reserved for UI-level actions. Otherwise, post_author always gets stored,
 and that seems to be just a bit of a problem. (It could be argued this is
 a UI-level check, in terms of confirming things to delete.)

 Unsure how this didn't come up previously. Reported by flashingcursor over
 Twitter.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16358>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list