For some reason, the most basic wordpress user query i got from this generator
https://generatewp.com/wp_user_query/
is displaying that it has not found any users
$args = array (
);
// The User Query
$user_query = new WP_User_Query( $args );
// The User Loop
if ( ! empty( $user_query->results ) ) {
foreach ( $user_query->results as $user ) {
//do stuff here
}
} else {
echo "no users found";
//this is the error i keep getting. so this basic script is not finding any results
}
am i missing something?