diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php index c81d092efe..01542a9b6b 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php @@ -701,6 +701,11 @@ class WP_REST_Users_Controller extends WP_REST_Controller { * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. */ public function delete_item( $request ) { + // We don't support delete requests in multisite. + if ( is_multisite() ) { + return new WP_Error( 'rest_cannot_delete', __( 'The user cannot be deleted.' ), array( 'status' => 501 ) ); + } + $id = (int) $request['id']; $reassign = false === $request['reassign'] ? null : absint( $request['reassign'] ); $force = isset( $request['force'] ) ? (bool) $request['force'] : false; diff --git a/wp-includes/version.php b/wp-includes/version.php index 00b67c159e..2e69856fab 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-39436'; +$wp_version = '4.8-alpha-39438'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.