[wp-trac] [WordPress Trac] #38962: REST API: Don't delete posts/links when deleting/removing a user from a site in a multisite install
WordPress Trac
noreply at wordpress.org
Wed Nov 30 22:49:10 UTC 2016
#38962: REST API: Don't delete posts/links when deleting/removing a user from a
site in a multisite install
------------------------------------------+------------------------
Reporter: ocean90 | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 4.7
Component: REST API | Version: trunk
Severity: major | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses: multisite
------------------------------------------+------------------------
Comment (by jeremyfelt):
[attachment:38962.2.diff] adds tests and updates the error code to 501
(props @ocean90).
The tests assert the new error code rather than skipping entirely so that
they break when we do add the functionality for multisite.
The error message itself isn't descriptive, but I copied from elsewhere to
avoid a new string.
> What should be passed as `reassign` to delete content instead? Right now
we only rely on passing the fallback `null` to `wp_delete_user()`.
We discussed just passing `null` in Slack, but because `reassign` is set
as type `integer`, that results in an invalid parameter. Unless I'm
missing something, which is definitely possible.
Can we use `0` or `-1`? Should there be another parameter to delete
content separate from `reassign`?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38962#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list