Ticket #38962: 38962.diff
File 38962.diff, 922 bytes (added by , 8 years ago) |
---|
-
src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
676 676 $reassign = isset( $request['reassign'] ) ? absint( $request['reassign'] ) : null; 677 677 $force = isset( $request['force'] ) ? (bool) $request['force'] : false; 678 678 679 // We don't support delete requests in multisite. 680 if ( is_multisite() ) { 681 return new WP_Error( 'rest_cannot_delete', __( 'The user cannot be deleted.' ), array( 'status' => 500 ) ); 682 } 683 679 684 // We don't support trashing for users. 680 685 if ( ! $force ) { 681 686 return new WP_Error( 'rest_trash_not_supported', __( 'Users do not support trashing. Set force=true to delete.' ), array( 'status' => 501 ) );