WP Approve User

Adds action links to user table to approve or unapprove user registrations.

Description

This plugin lets you approve or reject user registrations.
While a user is unapproved, he/she can’t access the WordPress Admin.

On activation of the plugin, all existing users will automatically be flagged Approved. The blog admin will never experience restricted access and does not need approval.

Translations

I will be more than happy to update the plugin with new locales, as soon as I receive them!
Currently available in:

  • Deutsch
  • English

Installation

  1. Download WP Approve User.
  2. Unzip the folder into the /wp-content/plugins/ directory.
  3. Activate the plugin through the ‘Plugins’ menu in WordPress.

Frequently Asked Questions

None asked yet.

Screenshots

Error message for unapproved users
Row action “Approve”
Row action “Unapprove”
Count notification and row highlight for unapproved users

Changelog

1.1.1

  • Fixed a bug, where the call to action bubble didn’t account for newly registered

1.1.0

  • Added bulk action for approving and unapproving users
  • Added notification of unapproved users in admin menu item (WordPress 3.2+)
  • Added highlight of unapproved users
  • Added action hooks on (un-)approval. See hook reference
  • Users created by an Administrator will automatically be approved
  • Updated utilities class
  • Now an instance of the Obenland_Wp_Approve_User object ist stored in a static property to make deregistration of hooks easier.

1.0

  • Initial Release

54 thoughts on “WP Approve User

  1. Does this work with WordPress Multisite? I’m looking for some way to do this to prevent spammers from creating blogs, at least without someone approving them manually and I cant seem to find anything that does this. I’ve testing different plugins, including this one, but haven’t gotten it working right yet. Thanks

    • Hi Matthew,

      currently it doesn’t.
      It shouldn’t be too hard to make it compatible though.

      Doesn’t the account activation process slow down spammers? Or do they randomly call non-existing subdomains and register these?

  2. Once the new user has been approved will it send out an email to the new user informing them they have been approved. So far I have done test approval and not such email has been received.
    Thanks Lynn

    • Hi Lynn,

      the plugin doesn’t send out confirmation emails (yet). I’ll look into adding that feature in one of the next releases. It just adds a lot of overhead, that’s why I haven’t implemented it in 1.0.

      Check back next week! πŸ™‚

  3. Any news on the confirmation mails function? Your plugin is the only one out there that actualy does what it is supposed to do ! Easly approve new users!!

    • As a matter of fact, I’m currently in the process of developing a lightweight add-on plugin with that functionality, exclusively for Aspect Webdesign.
      It’s still very much in BETA, but should be finished by the end of the week.
      I’ll check whether I can make it public.

  4. I have a few hundred users on my site so it’s difficult to see new unapproved registrations. Possible to add a ‘view all unapproved’ or sort by new registrations?

  5. I have activated the plugin but it is not working as I like it to.

    When a new user registered he/she is automatically logged in. Is there a way to fix this so that when a new user registers it will bypass the login and shows an alert message that “The account has to be confirmed by an administrator”.

    Thank you for the plugin and hope there is a solution to this.

    mario

    • Hi Mario,

      that is actually exactly how my plugin is supposed to behave. Do have any other user management plugin active in parallel?

  6. Is there a way to contribute to this plugin (Github or something else)? I made some changes to the code that I think are an improvement. I was seeing two “Users” menus in wp-admin due to the incorrect index for the $menu array. I’ve modified the admin_menu function to search the $menu array for the correct index. Also instead of deleting the existing $menu array item it simply alters the one value that needs to change.

    wp-approve-user.php:
    ================

    public function admin_menu() {
                
    	if ( current_user_can('list_users') AND version_compare(get_bloginfo('version'), '3.2', '>=') ) {
    		global $menu;
                            
                    $users_index = 70;
                    foreach ($menu as $key=>$item) {
                    	if ($item[0] == __('Users')) {
                            	$users_index = $key;
                            	break;
                    	} 
                    }
    			
    		$awaiting_mod = count(get_users(array(
    			'meta_key'		=>	'wp-approve-user',
    			'meta_value'	=>	false
    		)));
    		
    		$menu[$users_index][0] = __('Users') . " " . number_format_i18n($awaiting_mod) . "";
    	}
    }
    
    • Hi Rd,

      as a matter of fact, you chose the (currently) best channel for it! πŸ™‚

      To be honest, it never occurred to me other developers might want to contribute. You’re right, GitHub would be perfect for that. Maybe it’s time for me to start get into Git then…

      I agree, your approach would really make a difference. Expect it to be patched in the next update! Thank you for your contribution!

      Konstantin

    • Hey Rd,

      I managed to migrate my development environment to GitHub, including WP Approve User.

      Feel free to fork it, submit pull requests or open issues! πŸ™‚

  7. A great plugin – should be a core part of WP – glad you made one. I have a question – can we make it work for Editors too – not just admin?

    As an admin – I develop the site – site owner is the editor – so they need to approve new users rather than me.

    • Hi Scotty,

      the Plugin asks for the right user permissions, depending on context. Currently it’s 'add_users', 'promote_users' and 'edit_user', with the latter being removed in the next version. So adding these permissions to the Editor role, will make it happen! πŸ™‚

      [UPDATE]: Turns out the 'edit_user' capability will still be required in the future. So you should add the following caps to editors:

      • 'list_users'
      • 'create_users'
      • 'promote_users'
      • 'edit_users'
      • 'delete_users'

      Konstantin

  8. Love this plugin – it does it’s job quickly and simply!

    I also use a plugin called “auto chimp” which automatically signs up users on my MailChimp list when they register. With the large number of spammers, I’d like to defer the signup until they are approved so to avoid all the back and forth with MailChimp.

    I’m not sure how to call that function from within your plugin. Am I right in assuming that adding a hook in the approve user function would give me what I need? Or, is there a better way?

    Thanks!

    • Hi Diana,

      thank you for your feedback!
      I don’t know my way around AutoChimp, but on approval WP Approve User calls the 'wpau_approve' action, which you can hook into. It passes the user ID.

      Konstantin

  9. I have returned to this plugin and have installed it again. After testing I found that an email does now go out to new approved members and but also an email goes out when denied. Not that I’m bothered about this, because a spammer is not welcome on the site anyway.
    What I’m also finding is that the member has also do be approved on the Buddypress system as well for them to fully be able to log in. Again this is not a problem now that I know what needs doing. Thanks for updating the plugin, does the job nicely, will keep looking out for updates. Thanks

    • Hi Lynn,

      did you download the Plugin from GitHub? The version hosted on the WordPress Plugin Repository does not send emails yet πŸ™‚
      I’m glad you like it! Check out the Plugin’s Options page to customize the email text etc.

      Konstantin

  10. just wondering if there is a dashboard widget that comes up and tells you about users that need to be approved/denied.

    also wondered if there’s a hook that I can test if is_user_approved() or do I just use the if is_user_logged_in() ? since they need to be approved before they can.

    • Hi Jeff,

      as you can see from the last screenshot in the plugin repository, there is a number bubble (like with comments) that tell you how many users are waiting for approval.

      To check if a user is approved, you can do the following:

      if ( get_user_meta( $user_id, 'wp-approve-user', true ) ) {
          // do something
      }
      

      Thank you for your feedback!
      Konstantin

      • in my situation, I might still just need to use if (is_user_logged_in())

        basically what I’m trying to do is that I have a list of products, and if the user is logged in, I want to show the prices, but if they aren’t, it says “login to see” or something similar. tho I want to make it so that I have to approve the users so that my competitors can’t just create an account and see what my pricing is.

        • Oh, sure! The example will just tell you if they are approved or not. You could create a wrapper function like so:

          function prefix_is_user_approved() {
              return get_user_meta( get_current_user_id(), 'wp-approve-user', true );
          }
          
  11. my question tho is do I need to do that? since they can’t log in until they’ve been approved, correct?

    • You can customize it, once you activate sending the email.
      This doesn’t seem very intuitive πŸ™‚

    • By checking the “Send X Email” Chackbox above the textarea.
      I’ll have it changed in the next version..

  12. GREAT PLUG IN- THANK YOU………… One question, in the screenshot and when logged in I see the bubble showing how many users are pending for approval but do NOT SEE row highlight for unapproved users. So, how do I find the pending ones without going through pages and pages of users ? I saw a previous answer of changing some default number of users to show but do not see that option ?

    Thanks

    • You can edit it through the Screen Options tab in the top right corner of the user admin.

  13. I do not see the ability to deny a user. I can delete the user without approving them, but then they won’t receive the denied email. Also, I don’t want to delete them in case they just enetered the wrong email address. (I am using your plugin to restrict users to students with .edu email addresses, and many of them will register using their personal email without thinking about it.)

    • Hi Josh,

      thank you for your comment!

      As you can see in the screenshots bundled with the Plugin, there are inline action links with every user, either letting you approve or unapprove them.
      You have to specifically enable the denied email in the Plugin settings in the Settings section.

      From what I understand you run a bigger site, probably even multisite, so maybe you want to look into a more sophisticated user management plugin to accomodate your needs?

      Thank you for using WP Approve User, though!
      Konstantin

  14. LOVE THE PLUGIN! I have a question (which most were answerd in this thread). Since we can’t sort by user status, anyway we can add a “date received,” or something similar, and sort by that? The users will display according to date not alphabetically. Right now, I registered with a username beginning with “T” and I had to search for it. It didn’t highlight it. If there is a workaround that would be great!

  15. “On activation of the plugin, all existing users will automatically be flagged Approved” – NOT HAPPENING – what am i missing?

  16. I’ve installed your plugin to use with WooCommerce – it is not working, like I never installed it. Are you aware of any conflicts with WooCommerce? Thanks.

  17. This plugin seems to be the best suited to my needs, yet when I activate it through the WP Dashboard, even though I get the ‘Plugin Activated’ message nothing happens.

    Nothing is added to the usermeta, nothing happens with the Users view, and even though I have added error_log calls into the construct and activation functions, they are not being called.

    Do you have any idea what may be causing this?

    Running v2.1.1

    • Going over this once again, I found that WordPress was set to not allow registrations under General Settings.

      Enabling this fixed the issue

  18. I like your plugin. I have over 2,000 registered users . when new ones register is a problem finding them amongst the 2000. Is it possible to make the new user have a role of “pending” rather than “subscriber” so that i can find them?

    Another plugin “New User Approve” has a separate approval page where all of the pending users are shown and you approve or deny. The problem I have with this plugin is no bulk approve or deny which takes too long when I get 20 to 40 users per day.

    • Hi Rick,

      You’ll be happy to hear that I added that functionality in the latest update to the plugin! πŸ™‚

  19. I really like your plugin. It’s simple, straightforward, and it works!

    Is it possible to have it send out an email notice to admin that there are user registrations awaiting approval the way you can with comment approvals? Don’t want to make new users wait any longer than necessary to gain access to the site.

    Thanks,

    Milmon

    • Thanks! πŸ™‚

      Sure, I can add that. Makes sense. It will be a while though, I’m pretty swamped right now.

  20. Howdy,

    I decided to close comments here and link to the plugin’s support forum instead. I hope this will give everyone a better chance to receive an answer to their question in a reasonable time as I’m not always able to react to comments right away.

    Thanks!

Comments are closed.