json-endpoints/jetpack/class.jetpack-json-api-user-create-endpoint.php 1 location
|
@@ 53-56 (lines=4) @@
|
| 50 |
|
|
| 51 |
|
public function get_user( $user_id ) { |
| 52 |
|
$the_user = $this->get_author( $user_id, true ); |
| 53 |
|
if ( $the_user && ! is_wp_error( $the_user ) ) { |
| 54 |
|
$userdata = get_userdata( $user_id ); |
| 55 |
|
$the_user->roles = ! is_wp_error( $userdata ) ? $userdata->roles : array(); |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
return $the_user; |
| 59 |
|
} |
json-endpoints/class.wpcom-json-api-site-user-endpoint.php 1 location
|
@@ 153-156 (lines=4) @@
|
| 150 |
|
|
| 151 |
|
public function get_user( $user_id ) { |
| 152 |
|
$the_user = $this->get_author( $user_id, true ); |
| 153 |
|
if ( $the_user && ! is_wp_error( $the_user ) ) { |
| 154 |
|
$userdata = get_userdata( $user_id ); |
| 155 |
|
$the_user->roles = ! is_wp_error( $userdata ) ? array_values( $userdata->roles ) : array(); |
| 156 |
|
} |
| 157 |
|
|
| 158 |
|
return $the_user; |
| 159 |
|
} |