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 c452b30472..a9aff62651 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 @@ -196,7 +196,8 @@ class WP_REST_Users_Controller extends WP_REST_Controller { $can_view = false; $types = get_post_types( array( 'show_in_rest' => true ), 'objects' ); foreach ( $types as $type ) { - if ( current_user_can( $type->cap->edit_posts ) ) { + if ( post_type_supports( $type->name, 'author' ) + && current_user_can( $type->cap->edit_posts ) ) { $can_view = true; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 5afe8dcd5b..de343553ce 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43135'; +$wp_version = '5.0-alpha-43137'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.