It would appear that this is an XY problem, where Y is what you’re asking ( an attempt to solve X, your real problem ), and X is the inability to retrieve only confirmed/active users
Firstly, what you wanted to do isn’t quite possible in multisites, there’s already a table named wp_signups
for these users, that tracks the pending confirmation and necessary keys, since a user might be confirmed on one blog and not another. So deleting users that aren’t confirmed for your root blog, might delete users that are confirmed on other blogs, destroying data/logins.
So I’m going to answer your original problem, in the context of a singular site, as it’s significantly simpler:
SELECT * FROM $wpdb->users WHERE user_status != 2
Taken from the plugin named unconfirmed, but with the logic flipped
Related Posts:
- Issue with get_theme_mod returning a blank value instead of the saved value
- Set default options for inserting media
- How do I change parameters without changing the core
- Post thumbnail relative link and HTML modify
- Save_post – Warning: Cannot modify header information
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- How do I add functionality to images?
- Copy and Modified WooCommerce function is_coupon_valid [closed]
- Add multiple custom fields to the general settings page
- Define custom Page Template without its own .php file
- Is it possible to remove the “standard” post format?
- Woocommerce add to simple product attribute programmatically [closed]
- How to remove row-actions from pages table?
- Show modified time if post is actually modified
- why doesnt is_home() work in functions.php
- How can I tell if I’m on a login page? [duplicate]
- Modify search function in WordPress (TwentyTwelve)
- Auto delete WordPress images/thumbnails (all sizes) and featured after X days/hours, or similar?
- How to fix a theme with page.php Default Template that accidentally deleted?
- Adding extra SVGs to TwentyNineteen child theme using class TwentyNineteen_SVG_Icons
- Problem with extract() with custom shortcode
- add sidebar area to header of child theme
- Theme-Config tab in admin Pannel?
- Creating loop within functions.php
- Increment price for Woocommerce Minicart [closed]
- adding custom classes for tables
- Pass Shortcode Attribute to footer Script
- PHP files included in functions.php don’t seem to work
- How Can I Expand the WordPress Customize window without any Plugin?
- Set quantity of woocommerce product on page visit [closed]
- wp_dropdown_categories and custom attribute
- How to display post content instead of excerpt
- Automatically wrap multiple images in div
- Ajax not working properly
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘greenday_head’ not found or invalid function name
- Which action does wp_update_user triggers?
- Include default functions and methods
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- How can I get my Script to work on the Login page?
- How can I modify all existing tags while keeping the urls themselves?
- Trigger a custom function when option are saved in admin area
- Execute a ultimate member action when user role is updated
- Add other social networks to TwentyNineteen_SVG_Icons class in child theme?
- Unable to login using username
- different style sheet for just one page template
- Override the WordPress core function wp_referer_field
- How to return hook data when multiple parameters are present?
- Hook into a function without a hook?
- Condition OR for current user ID
- Control the srcset much more (not all sizes in it each time)
- How to add_filter html template to middle of content
- Filter yoast canonical add_action priority [closed]
- Where do I store custom functions that call custom page template files?
- Wp-query Order By problem
- Add back in child theme what the parent theme removed with remove_action
- login_headertitle is deprecated since version 5.2.0
- Writing a function to detect an event
- Add attribute only to first image of every post via functions.php
- Different favicon on different pages
- Changing where my author box is printed
- Add Adsense code between job listings – wp job manager plugin
- Problem with images URL after filter applying
- Insert a field with PREG_REPLACE – strange behaviour
- How to echo Widget Title in Custom Frontend-Template Box
- how to display a page before the home page
- loginout function customization
- How to place a div inside a function that creates a div
- Show errormessages on wrong username/password on custom loginform?
- implementing a centralized content “show-do-not-show” toggle?
- How would I make a function to dynamically determine if user is logged to change navigation menu text?
- How to display this meta data (an array) in form of a function (created with a custom write panel)?
- WordPress – using sessions?
- WordPress comment processing . Default unapproved comments detection before posting
- How to remove font awesome from loading in wp theme
- CF7 select value get to function and reciept value from function
- Does hooking into a plugin action / filter override the plugin’s function for that hook?
- Extend WordPress Audio Widget to accept HLS (.m3u8) URLs
- How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?
- Woocommerce custom calculation function
- WordPress Ajaxifying not working properly
- WordPress function with attribute pass to template
- Will dequeueing in child theme functions.php file prevent Google Fonts from loading?
- How can I stop the hook from breaking the login/logout function?
- Adding A New Widget to WordPress Disables the Existing Widgets
- Help! Need a different logo on my main page from my other pages
- Display page number on custom page title function
- How to echo the translated custom field?
- How to replace words in my posts and saved new words
- Shortcode to eliminate and replace with
- Add functionality to post editor
- Why does modifying my functions.php file always result in a server error
- Why wp_ajax hooks doesn’t work?
- Remove snippets of JS from core
- How can I append and prepend something to all post hyperlinks without using ::before or ::after? PHP hook solution?
- Why functions metaboxes is causing White Screen in Admin [closed]
- Explode Array from Repeatable Custom Field
- image_size with respect to aspect ratios
- WordPress Custom wp mail template return full template
- How to create a post without link in wordpress?
- post_row_actions filter from parent theme not executing in child theme