$users = $wpdb->get_results( "SELECT user_id, user_login, display_name, user_email, role FROM {$wpdb->users}, {$wpdb->user_role} WHERE {$wpdb->users}.ID = {$wpdb->user_role}.user_id AND {$wpdb->user_role}.role IN ('".implode("','", $roles)."') GROUP BY user_id ORDER BY {$wpdb->user_role}.user_id" );