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]
- wp_login_form display no styled form
- Registration Hooks don’t appear to be working
- jQuery does not work
- Why does re-using this function not work? [closed]
- Pass parameter to hooked function using custom page template
- 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?
- What is the text that appears beside the page titles in the list of pages in the WP admin?
- How to edit the Tags within the image file URLs?
- Condition OR for current user ID
- Is my code correct to enqueue CSS on a specific page?
- Can’t properly set the_title add_filter to show short_URL
- Control the srcset much more (not all sizes in it each time)
- How to retrieve the current post’s generated featured image size?
- How to add_filter html template to middle of content
- Filter yoast canonical add_action priority [closed]
- (Woocommerce) Order by price when entering specific category
- How do I hook into the container of wp_nav_menu?
- Remove links from the_content when using filters wp_trim_excerpt
- Custom Behavior when Adding New Custom Post Type in Dashboard
- Where do I store custom functions that call custom page template files?
- Plugin Development – Functions or Hooks?
- Why There Is No “get content by ID” Function
- Is there a way to prevent a function/method from being called outside a specific hook?
- Add an Outside Wrapper to my Header and Make it Full Width
- Custom HTML markup
- Auto log in hook is requiring a page refresh
- Use a shortcode to display custom meta box contents
- Wp-query Order By problem
- Possible to hook into Media Library preview File column and use a custom image?
- Function not working inside of a function in functions.php
- Create custom function for hero image
- Randomizing wp_tag_cloud() in child theme
- Adding code before post title with the_title produces weird results
- Add back in child theme what the parent theme removed with remove_action
- login_headertitle is deprecated since version 5.2.0
- How to append classname to body tag if guest user
- Writing a function to detect an event
- Where do I go to edit this area? [closed]
- error at login page in wordpress
- Replace plugin function with a custom function?
- Add attribute only to first image of every post via functions.php
- Different favicon on different pages
- The_content and Preg_replace in loaded Iframe [closed]
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- WordPress wraps span tags into p tags
- Changing where my author box is printed
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- Insert Content Before div#main from the functions.php File
- Add Adsense code between job listings – wp job manager plugin
- Problem with images URL after filter applying
- two search forms on the same page
- Function to replace comment’s accented characters before posting
- update_post_meta is Updating with two page id
- Insert a field with PREG_REPLACE – strange behaviour
- How to echo Widget Title in Custom Frontend-Template Box
- Replace admin header logo with an image
- New checkbox in custom widget isn’t saving data
- Linking Javascript in functions.php file
- how to display a page before the home page
- loginout function customization
- Why I can’t load my JavaScripts using an hook inside my functions.php file?
- is_home() not working in functions.php file
- How to conditionally add a widget via a hook in functions.php
- How to place a div inside a function that creates a div
- Show errormessages on wrong username/password on custom loginform?
- Function to check if custom page is used by page?
- Changing the text of Upload/Insert on Posts and Pages Screen
- 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?
- Filter for replacing the WP_query object for a given category
- How to display this meta data (an array) in form of a function (created with a custom write panel)?
- WordPress – using sessions?
- How to add or delete default value theme options while activate and deactivate theme
- WordPress comment processing . Default unapproved comments detection before posting
- Warning at top of website & top menu gone
- How to remove font awesome from loading in wp theme
- Removing “There is no account with that username or email address.” error message in “/wp-login.php?action=lostpassword”
- How to replace ACTION url from original wordpress login form?
- Header menu aligned right on all pages except for single-post page [closed]
- Does hook have an effect on increasing the page load?
- What is the earliest Hook a Script can use?
- Populate acf-field, depending on block name
- custom error message for empty username and password using authenticate filter not working
- Modifying a WordPress Plugin
- CF7 select value get to function and reciept value from function
- Hide author info in single posts by certain users
- External api call and make global variable for any page visitor enters , page-home, page, single etc
- How Do I Unhook This Parent Theme Function?
- Unable to login after registration