About

Wrapper for WP_User_Query. Retrieves an array of users matching specific criteria.

Usage:

<?php 

    $args = array(
        'blog_id'      => $GLOBALS['blog_id'],
        'role'         => '',
        'meta_key'     => '',
        'meta_value'   => '',
        'meta_compare' => '',
        'meta_query'   => array(),
        'date_query'   => array(),        
        'include'      => array(),
        'exclude'      => array(),
        'orderby'      => 'login',
        'order'        => 'ASC',
        'offset'       => '',
        'search'       => '',
        'number'       => '',
        'count_total'  => false,
        'fields'       => 'all',
        'who'          => ''
    ); 

    $myusers = get_users( $args );

?>

Return: (array) List of users.

Reference:

codex.wordpress.org and developer.wordpress.org

history | excerpt history