Request WP_User objects when caling get_users() in XML-RPC's wp.getUsers method. see #18428.
git-svn-id: https://develop.svn.wordpress.org/trunk@22134 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d1d7ac7197
commit
64e8309d8e
@ -912,8 +912,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
|
||||
if ( in_array( 'all', $fields ) ) {
|
||||
$_user = array_merge( $_user, $user_fields );
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if ( in_array( 'basic', $fields ) ) {
|
||||
$basic_fields = array( 'username', 'email', 'registered', 'display_name', 'nicename' );
|
||||
$fields = array_merge( $fields, $basic_fields );
|
||||
@ -2092,7 +2091,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
if ( ! current_user_can( 'list_users' ) )
|
||||
return new IXR_Error( 401, __( 'Sorry, you cannot list users.' ) );
|
||||
|
||||
$query = array();
|
||||
$query = array( 'fields' => 'all_with_meta' );
|
||||
|
||||
$query['number'] = ( isset( $filter['number'] ) ) ? absint( $filter['number'] ) : 50;
|
||||
$query['offset'] = ( isset( $filter['offset'] ) ) ? absint( $filter['offset'] ) : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user