[wp-trac] [WordPress Trac] #39000: REST API: Require the reassign parameter when deleting users

WordPress Trac noreply at wordpress.org
Fri Dec 2 05:34:46 UTC 2016


#39000: REST API: Require the reassign parameter when deleting users
---------------------------------------------+-----------------------
 Reporter:  jeremyfelt                       |       Owner:
     Type:  defect (bug)                     |      Status:  new
 Priority:  normal                           |   Milestone:  4.7
Component:  Users                            |     Version:  trunk
 Severity:  normal                           |  Resolution:
 Keywords:  has-patch has-unit-tests commit  |     Focuses:  rest-api
---------------------------------------------+-----------------------
Changes (by jeremyfelt):

 * keywords:  needs-patch needs-unit-tests => has-patch has-unit-tests
               commit


Comment:

 [attachment:39000.4.diff] enforces expected values for the now required
 `reassign` parameter.

 * `1` and above will be treated as a possibly valid `post_author` value.
 * `0` is treated as a valid `post_author` value.
 * `false`', `'false'`, and `''` are treated as falsy and specify that
 posts for the user should be trashed when that user is deleted.

 Additional tests are added to test these new possibilities.

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


More information about the wp-trac mailing list