I using get_users to get users from my database.
I am using this code:
$args = array ( 'role' => 'Colaborador', 'role__not_in' =>[ 'subscriber', 'Administrator'], 'orderby' => 'rand' ); $users = get_users($args );
But in the output when use the foreach to print the data I need I found that are some user that are duplicate, appearing twice in the array.
How can i fix this?