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

WordPress Trac noreply at wordpress.org
Thu Dec 1 15:54:18 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 joehoyle):

 @jeremyfelt why the `444` status code for the response here?

 > I may be missing something, but it seems like this check in
 has_valid_params() won't allow a required parameter to also be null.

 This sounds correct, I think we probably shouldn't use `required` here -
 the whole `null` means "delete", but `null` needs to be passed is somewhat
 funky. `null` is typically not a value in the rest api. Did we discuss
 using `false` to mean "don't reassign the posts"? That seems like the most
 logical / semantic value to indicate this to me.

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


More information about the wp-trac mailing list