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 c452b30472..a9aff62651 100644
|
a
|
b
|
class WP_REST_Users_Controller extends WP_REST_Controller { |
| 196 | 196 | $can_view = false; |
| 197 | 197 | $types = get_post_types( array( 'show_in_rest' => true ), 'objects' ); |
| 198 | 198 | foreach ( $types as $type ) { |
| 199 | | if ( current_user_can( $type->cap->edit_posts ) ) { |
| | 199 | if ( post_type_supports( $type->name, 'author' ) |
| | 200 | && current_user_can( $type->cap->edit_posts ) ) { |
| 200 | 201 | $can_view = true; |
| 201 | 202 | } |
| 202 | 203 | } |