Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions lib/endpoints/class-wp-rest-users-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,6 @@ public function create_item_permissions_check( $request ) {
* @return WP_Error|WP_REST_Response
*/
public function create_item( $request ) {
global $wp_roles;

if ( ! empty( $request['id'] ) ) {
return new WP_Error( 'rest_user_exists', __( 'Cannot create existing resource.' ), array( 'status' => 400 ) );
}
Expand Down Expand Up @@ -650,8 +648,6 @@ protected function check_role_update( $user_id, $roles ) {
* @return array
*/
public function get_item_schema() {
global $wp_roles;

$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'title' => 'user',
Expand Down