Wordpress get_users() returning all users with a compare query

Viewed 5881

I can't seem to figure out why all users are getting returned with this query. Any help would be appreciated.

function user_main(){

    $args = array(
        'meta_key'     => 'profilepicture',
        'meta_value'   => '3',
        'meta_compare' => '='
        );

    $query = new WP_Query( $args );

    $blogusers = get_users( $query );

    // Array of WP_User objects.

    foreach ( $blogusers as $user ) {

        $current_meta = get_user_meta($user->ID, 'profilepicture', true); 
        write_log($user->ID . ' ' . $current_meta);
    }

}
2 Answers
Related