A WordPress-centric search engine for devs and theme authors



get_users ›

Since3.1.0
Deprecatedn/a
get_users ( $args = array() )
Parameters:
  • (array) $args Optional. Arguments to retrieve users. See WP_User_Query::prepare_query(). for more information on accepted arguments.
    Required: No
    Default: array()
See:
  • WP_User_Query
Returns:
  • (array) List of users.
Defined at:
Codex:

Retrieve list of users matching criteria.



Source

function get_users( $args = array() ) {

	$args                = wp_parse_args( $args );
	$args['count_total'] = false;

	$user_search = new WP_User_Query( $args );

	return (array) $user_search->get_results();
}