WordPress.org

Make WordPress Core

Ticket #49450: 49450.diff

File 49450.diff, 724 bytes (added by johnwatkins0, 12 months ago)
  • src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

    diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
    index e8d4b5c09c..d493f06d0b 100644
    a b class WP_REST_Users_Controller extends WP_REST_Controller { 
    12111211                        }
    12121212
    12131213                        // Include admin functions to get access to get_editable_roles().
    1214                         require_once ABSPATH . 'wp-admin/includes/admin.php';
     1214                        require_once ABSPATH . 'wp-admin/includes/user.php';
    12151215
    12161216                        // The new role must be editable by the logged-in user.
    12171217                        $editable_roles = get_editable_roles();