﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
22212,WP_User_Query( array('role' => $role) ) should accept array or not return anything if array,thomask,,"I got a small problem with WP_User_Query - i wanted to find users from more then one roles to send them e-mail, so i did


{{{
$role = array('role-1','role-2);
$wp_user_search = WP_User_Query( array('role' => $role) );
$users = $wp_user_search->get_results()
foreach ($user) ... send wp_mail
}}}


problem is, that role param accepts only string. It would not be a problem if it would return nothing, problem was, that it actually returns ALL users, so i have send my author-only emails to all thousands users in database :-(

I know that it is my fault, that i have to read documentation, but i thought, that it works as other wp queries, so if the parame do not fit, it throws error, but it does not.",enhancement,reopened,normal,Awaiting Review,Users,,normal,,has-patch needs-unit-tests needs-testing,knut@… justin@… r_a_m_i@… wpcore@…
