I think you are missing the relation
key here. If you want the users to be picked up when both the above meta values are matched, then you should use this as below
$users_sent_to_admin = new WP_User_Query(
array(
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'pending_approval',
'value' => 'true',
'compare' => '='),
array(
'key' => 'is_photographer',
'value' => 'true',
'compare' => '='
),
)
)
);
Related Posts:
- Multiple developers / editors working on a site in progress
- How many users can WordPress handle?
- How to track user progress?
- Performance tips for a large user base [closed]
- Efficiency on displaying random authors based on large database
- Extend the wp_users table
- How to use user table of a different database for WordPress users?
- Subscribers to posts
- Set Display Name to first and last name (phpmyadmin SQL Query)
- Select Multiple meta_value from WP DB; Single Query
- Getting all the users who have author privilege
- Does WordPress always create unique passwords?
- In what part of the WordPress core does the users table and usermeta table get joined?
- Why is it that not all users have a ‘session_tokens’ meta_key record in the usermeta table?
- Modify Database in Multi-Site wp_usermeta table
- Change WordPress prefix for only one table?
- wp_get_current_user always returns 0 continued
- Is there a smart way to obtain a list of only some selected user meta data?
- How can i customize the export personal data file?
- What Is the Proper Way to Merge Usermeta Table to a an existing WP Database?
- Import users from old WP site to new one
- How to Access wp_usermeta Data Immediately After a New User is Created
- Logins from WP users table use on another page
- MS Access to manage WordPress Database
- 2 WordPress sites with 2 databases but sharing the same users
- Convert user passwords to MD5?
- Does WordPress store the username as a primary key in the database?
- Is there a way to execute a php script outside WordPress?
- multiple wordpress installation with shared usertable on an different database
- Best practice to import user base (subscribers) from one website to another?
- Share users across multiple sites on same database, but with different domains
- Users table missing from Database [closed]
- Some weird users in database
- How to delete a particular row in a database table
- Recovering the table wp_usermeta from users
- Regenerate user_nicename column
- Storing user submitted forms [closed]
- wp_insert_user not creating account correctly when ID is manually set
- Select From wpdb – Author/User Directory page
- Can’t log into wordpress site – I have made a new user and still cant access
- Need help with creating a searchable user data by name or specific number like ID
- Migrate Users From laravel to wordpress
- Display user data in numbered list
- User input to database
- how add more field to wp user and save it to database
- Move Non-WordPress users table to WordPress database
- Change user_nickname for author page link
- how restrict user to give star ratings once for a post?
- create a table using user meta custom data
- How to get the id of recently registered user from database?
- How to save dropdown slection by a user in the DB
- How to get specific table by current user login
- update multiple user meta field based on another meta field
- Hash user emails in database?
- Changed meta_key value in structures, now dashboard shows zero users
- What WordPress file is saving new users to database
- Get id from database
- WordPress sync with phpbb
- import (migration) user database to wp-users
- Import Excel (or csv) Table with user-data as subscribers to wordpress
- WP Multisite Users Not Linking
- MySQL SELECT increment counter
- Exclude Statement in SQL
- Lost the `wp_options` table: what’s the best way to restore the site?
- How to move existing WordPress wp-content folder along with database to new server and new domain name?
- How might I retrieve a featured post image from an external WP site and display it as a link back?
- WordPress database becoming huge. How to analyze and optimize it? fear of running out of memory
- What’s the most efficient database method to add and query usermeta?
- How to solve slow WordPress site caused by attachment_metadata
- Is database safe after merging a branch of a more recent version over an older one?
- Large database causes slow load
- Is it possible to store visitors IPs in wp_postmeta table?
- Export all content from wordpress
- Import live site to local setup without access to live site
- Creating a Video Content Page (how to use query strings in wordpress)- Help!
- Hook directly into query execution
- Best way to tell if a user account is active, using the database only
- Catalina an MAMP Database Conenction Error
- A MySQL DB within a MySQL DB
- Is there a way to recover the table wp_term_relationships?
- “Database Connection Error” upon install in Apache VirtualHost document root.. Why did this happen? [closed]
- How Can I Put Meta_Compare in the Database-Query?
- Change options table prefix only
- What’s the proper way to sanitize checkbox value sent to the database
- How do I have now a duplicated user entry if this is not allowed (and I cannot replicate it)?
- Should I store critical css in the database or in my theme’s filesystem?
- Directly editing WP database issues
- How to share User Database between Two Multisite Installations + More
- Can two domains use the same database?
- Search Character Set Problem
- Custom user tables not working after migration
- How to fix Uploaded to this post option to see group of images uploaded to a post?
- adding user_id and name to a separate table whenever a user register based on role
- User saved through WordPress backend does not show up in database table users
- Adding featured for post using database
- get_the_terms is not working
- Store id from database query in cookie
- Return image urls with specific base string?
- Link to handle $_GET request
- SQL Query to get post_id from wp_posts and and meta_key(s) from wp_postmeta