Support » Plugin: New User Approve » [Plugin: New User Approve] Denied users still accepted as default role

  • Resolved threesongbirds


    It’s not a big deal because they will never receive their password to the site, but they still show up under “All users” despite being denied.
    I don’t know if this is something that can be fixed or needs to, but didn’t see this issue anywhere so I thought I’d say it.

    Thanks for the great plug in, works perfectly on 3.4.1 🙂

Viewing 12 replies - 1 through 12 (of 12 total)
  • nicolaelvin


    yes I need the user then to be deleted. If this plugin can’t do it, I might look into another one.

    I haven’t tested, but if this is normal, it would be preferable to completely remove denied users from the system. Unless there’s some way to go back and approve them after this, there’s no reason to keep their data in the database.

    Plugin Author Josh Harrison


    There is now a hook that now allows you to add anything to the deny or add actions.

    How would one go about using one of these hooks?

    How do I create the action of DELETE the denied users?

    It still appears in the user list, the forums subscibers, everywhere. I must have them deleted upon denial.

    Is there any way to get an example of deleting the user with the hook.

    I’ve tried the following but it doesn’t seem to work.

    add_action( 'new_user_approve_user_denied', 't262_delete_user' );
    function t262_delete_user ( $user_id ) {
    	global $wpdb;
    	require_once( '../wp-admin/includes/user.php');
    	wp_delete_user( $user_id );

    This code is located in my theme’s functions.php file.


    OK, here’s what I’ve got that works.

    add_action( 'new_user_approve_user_denied', 't262_delete_user' );
    function t262_delete_user ( $user ) {
    	global $wpdb;
    	require_once( ABSPATH . '/wp-admin/includes/user.php');
    	wp_delete_user( $user->ID );

    I’m tempted to role it up into a plugin. Anyone interested?

    @anty Fragen, thanks for your code ,its working 🙂

    I’d be interested in a plugin. Or an update to this plugin, that includes that as an option (checkbox?).

    Here’s a plugin that checks to see if New User Approve is loaded and will delete a denied user. Download, drop into plugin directory and activate. Alternately you can download, zip and add new.

    Feedback welcome.

    The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature

    ok ok I got it, now upload from wordpress but use ftp, not regular upload but drop in the folder. Then after I’m activated it, WordPress update was alert me for the update, but after I’m updating it, the function file have gone, then I redrop the file again, then open edit php file, I have make some change to Andy Fragen file because original plugin version are 1.4.2 lastest and Andy Fragen file version are 1.0, then change from v 1.0 to 1.4.2, then the alert update have gone, and the function works perfectly great. Thanks so much.

    Changing the version number of my little plugin will have no effect. The alert shows if you haven’t activated the base New User Approve plugin.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: New User Approve] Denied users still accepted as default role’ is closed to new replies.