Select ACTIVE users only
-
I’m using this query to fetch editors or contributors – but it’s finding inactive records for both.
$results = $wpdb->get_results(“SELECT distinct user_email as em from $wusers inner join $wmeta on ID = user_id WHERE meta_key like ‘%capabilities%’ and meta_value REGEXP ‘editor|contributor’ and user_email <> $thisUsersEmail”, ARRAY_A);
I’ve eyeballed records for active/inactive users at the db level, but don’t see anything to distinguish status. I’ve looked in forums, and also on Google w/o finding a solution.
Is there a field or method for determining which user records are active, and which are inactive/deleted?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Select ACTIVE users only’ is closed to new replies.