Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

True email confirmation for registration (keeping unvalidated users from user table)

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:

  1. Issue with get_theme_mod returning a blank value instead of the saved value
  2. Set default options for inserting media
  3. How do I change parameters without changing the core
  4. Post thumbnail relative link and HTML modify
  5. Save_post – Warning: Cannot modify header information
  6. How to use WP conditional tag in a functions.php with OCEANWP Theme?
  7. How do I add functionality to images?
  8. Copy and Modified WooCommerce function is_coupon_valid [closed]
  9. wp_login_form display no styled form
  10. Registration Hooks don’t appear to be working
  11. jQuery does not work
  12. Why does re-using this function not work? [closed]
  13. Pass parameter to hooked function using custom page template
  14. different style sheet for just one page template
  15. Override the WordPress core function wp_referer_field
  16. How to return hook data when multiple parameters are present?
  17. Hook into a function without a hook?
  18. What is the text that appears beside the page titles in the list of pages in the WP admin?
  19. How to edit the Tags within the image file URLs?
  20. Condition OR for current user ID
  21. Is my code correct to enqueue CSS on a specific page?
  22. Can’t properly set the_title add_filter to show short_URL
  23. Control the srcset much more (not all sizes in it each time)
  24. How to retrieve the current post’s generated featured image size?
  25. How to add_filter html template to middle of content
  26. Filter yoast canonical add_action priority [closed]
  27. (Woocommerce) Order by price when entering specific category
  28. How do I hook into the container of wp_nav_menu?
  29. Remove links from the_content when using filters wp_trim_excerpt
  30. Custom Behavior when Adding New Custom Post Type in Dashboard
  31. Where do I store custom functions that call custom page template files?
  32. Plugin Development – Functions or Hooks?
  33. Why There Is No “get content by ID” Function
  34. Is there a way to prevent a function/method from being called outside a specific hook?
  35. Add an Outside Wrapper to my Header and Make it Full Width
  36. Custom HTML markup
  37. Auto log in hook is requiring a page refresh
  38. Use a shortcode to display custom meta box contents
  39. Wp-query Order By problem
  40. Possible to hook into Media Library preview File column and use a custom image?
  41. Function not working inside of a function in functions.php
  42. Create custom function for hero image
  43. Randomizing wp_tag_cloud() in child theme
  44. Adding code before post title with the_title produces weird results
  45. Add back in child theme what the parent theme removed with remove_action
  46. login_headertitle is deprecated since version 5.2.0
  47. How to append classname to body tag if guest user
  48. Writing a function to detect an event
  49. Where do I go to edit this area? [closed]
  50. error at login page in wordpress
  51. Replace plugin function with a custom function?
  52. Add attribute only to first image of every post via functions.php
  53. Different favicon on different pages
  54. The_content and Preg_replace in loaded Iframe [closed]
  55. This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
  56. WordPress wraps span tags into p tags
  57. Changing where my author box is printed
  58. Is it possible to use add_filter in an included file in the child theme’s functions.php?
  59. Insert Content Before div#main from the functions.php File
  60. Add Adsense code between job listings – wp job manager plugin
  61. Problem with images URL after filter applying
  62. two search forms on the same page
  63. Function to replace comment’s accented characters before posting
  64. update_post_meta is Updating with two page id
  65. Insert a field with PREG_REPLACE – strange behaviour
  66. How to echo Widget Title in Custom Frontend-Template Box
  67. Replace admin header logo with an image
  68. New checkbox in custom widget isn’t saving data
  69. Linking Javascript in functions.php file
  70. how to display a page before the home page
  71. loginout function customization
  72. Why I can’t load my JavaScripts using an hook inside my functions.php file?
  73. is_home() not working in functions.php file
  74. How to conditionally add a widget via a hook in functions.php
  75. How to place a div inside a function that creates a div
  76. Show errormessages on wrong username/password on custom loginform?
  77. Function to check if custom page is used by page?
  78. Changing the text of Upload/Insert on Posts and Pages Screen
  79. implementing a centralized content “show-do-not-show” toggle?
  80. How would I make a function to dynamically determine if user is logged to change navigation menu text?
  81. Filter for replacing the WP_query object for a given category
  82. How to display this meta data (an array) in form of a function (created with a custom write panel)?
  83. WordPress – using sessions?
  84. How to add or delete default value theme options while activate and deactivate theme
  85. WordPress comment processing . Default unapproved comments detection before posting
  86. Warning at top of website & top menu gone
  87. How to remove font awesome from loading in wp theme
  88. Removing “There is no account with that username or email address.” error message in “/wp-login.php?action=lostpassword”
  89. How to replace ACTION url from original wordpress login form?
  90. Header menu aligned right on all pages except for single-post page [closed]
  91. Does hook have an effect on increasing the page load?
  92. What is the earliest Hook a Script can use?
  93. Populate acf-field, depending on block name
  94. custom error message for empty username and password using authenticate filter not working
  95. Modifying a WordPress Plugin
  96. CF7 select value get to function and reciept value from function
  97. Hide author info in single posts by certain users
  98. External api call and make global variable for any page visitor enters , page-home, page, single etc
  99. How Do I Unhook This Parent Theme Function?
  100. Unable to login after registration
Categories functions Tags customization, functions, hooks, wp-login-form
Custom Permalink Structure with Custom Post Types Using Custom Taxonomies
$content is empty while using DOMDocument

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress