Hi all,
I am using the WP_User_Query class, and the meta search ( meta_key, meta_value, meta_compare ) capabilities.
I am trying to do a search for all users who do not have a certain meta_key set to true. However, if the metadata does not exist for the user, then WP_User_Query doesn't return that user, despite the fact that I am using != as the comparison.
Here is my code, any thoughts?
$query = new WP_User_Query( array(
'role' => 'some_slug,
'meta_key' => 'some_sort_of_meta_key',
'meta_value' => 1,
'meta_compare' => "!=",
'number' => 25,
'offset' => $user_offset
) );
$users = $query->get_results();
Thanks!