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

WordPress Trac noreply at wordpress.org
Thu Dec 1 15:41:58 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:  needs-patch needs-unit-tests  |     Focuses:  rest-api
------------------------------------------+-----------------------

Comment (by jeremyfelt):

 [attachment:39000.diff] is an initial attempt at this, using a
 `sanitize_callback` to accept either `null` or an integer for the
 `reassign` parameter.

 I may be missing something, but it seems like
 [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/rest-api
 /class-wp-rest-request.php#L875 this check] in `has_valid_params()` won't
 allow a required parameter to also be `null`.

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


More information about the wp-trac mailing list