Either an array of row objects with properties the column names of the result of the SQL query – ie. the specified fields from the wp_users table or, if fields equals ‘all_with_meta’, an array of WP_User objects.
The fields value defaults to ‘all’, which will return all the columns in the wp_users table, but can be overridden by passing an array of specified fields – and is parsed as follows:
if ( is_array( $qv['fields'] ) ) {
$qv['fields'] = array_unique( $qv['fields'] );
$this->query_fields = array();
foreach ( $qv['fields'] as $field )
$this->query_fields[] = $wpdb->users . '.' . esc_sql( $field );
$this->query_fields = implode( ',', $this->query_fields );
} elseif ( 'all' == $qv['fields'] ) {
$this->query_fields = "$wpdb->users.*";
} else {
$this->query_fields = "$wpdb->users.ID";
}
see the query function in the WP_User_Query class definition – where the query results is replaced with WP_User objects if ‘fields’ is ‘all_with_meta’
function query() {
global $wpdb;
if ( is_array( $this->query_vars['fields'] ) || 'all' == $this->query_vars['fields'] ) {
$this->results = $wpdb->get_results("SELECT $this->query_fields $this->query_from $this->query_where $this->query_orderby $this->query_limit");
} else {
$this->results = $wpdb->get_col("SELECT $this->query_fields $this->query_from $this->query_where $this->query_orderby $this->query_limit");
}
if ( $this->query_vars['count_total'] )
$this->total_users = $wpdb->get_var( apply_filters( 'found_users_query', 'SELECT FOUND_ROWS()' ) );
if ( !$this->results )
return;
if ( 'all_with_meta' == $this->query_vars['fields'] ) {
cache_users( $this->results );
$r = array();
foreach ( $this->results as $userid )
$r[ $userid ] = new WP_User( $userid, '', $this->query_vars['blog_id'] );
$this->results = $r;
}
}
And finally, the WP_User object is documented here: http://codex.wordpress.org/Class_Reference/WP_User
and defined here: http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/capabilities.php