WordPress.org

Ready to get started?Download WordPress

Forums

New User Approve
[resolved] Denied users still accepted as default role (13 posts)

  1. threesongbirds
    Member
    Posted 1 year ago #

    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 :)

    http://wordpress.org/extend/plugins/new-user-approve/

  2. nicolaelvin
    Member
    Posted 1 year ago #

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

  3. Tevya
    Member
    Posted 1 year ago #

    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.

  4. Josh Harrison
    Member
    Plugin Author

    Posted 1 year ago #

    There is now a hook that now allows you to add anything to the deny or add actions. http://wordpress.org/extend/plugins/new-user-approve/other_notes/

  5. cordigital
    Member
    Posted 1 year ago #

    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.

  6. Andy Fragen
    Member
    Posted 1 year ago #

    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.

    TIA

  7. Andy Fragen
    Member
    Posted 1 year ago #

    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?

  8. Shubham Vijay
    Member
    Posted 11 months ago #

    @Anty Fragen, thanks for your code ,its working :)

  9. Tevya
    Member
    Posted 11 months ago #

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

  10. Andy Fragen
    Member
    Posted 11 months ago #

    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.

    https://gist.github.com/afragen/5624319

    Feedback welcome.

  11. iskandarX
    Member
    Posted 9 months ago #

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

  12. iskandarX
    Member
    Posted 9 months ago #

    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.

  13. Andy Fragen
    Member
    Posted 9 months ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.