Skip to:
Content
Pages
Categories
Search
Top
Bottom

Auto delete unactivated user


  • UgoDimma
    Participant

    @lovecoinz

    Hey guys

    I currently have thousands of unactivated users on my buddypress site. What I want is a plugin or code snipet that will auto delete users who has not activated their account after x days.
    Please am not good at coding, I only install plugins and code anipets with direction on how to do it and where to add it.

Viewing 5 replies - 1 through 5 (of 5 total)

  • Henry Wright
    Moderator

    @henrywright

    Take a look at Unconfirmed.


    UgoDimma
    Participant

    @lovecoinz

    @henrywright thanks for the suggestion, but it does not serve well to my expectation. I still have to do the manual work, not just that, that list appears from the most resent registered members.

    To be more specific, this is what I want; a plugin or code that will delete the user after x days of registration without activation. Let say a user registered on today, after two days without activating his/her account, his/her account will be deleted automatically with or without notice. That will reduce the administrative work of activating, deleting, and or resending activation link.


    Henry Wright
    Moderator

    @henrywright

    @henrywright thanks for the suggestion, but it does not serve well to my expectation.

    Ah, that’s a shame!

    I don’t think I’ve seen a plugin around that will do exactly what you need. I think you might have to write some custom code to get this done 🙁


    UgoDimma
    Participant

    @lovecoinz

    Ok. Thanks for your support. But it is unfortunate to me that I don’t know how to code at all.
    Can I get any help here. I can only copy and paste code, and or install plugins.


    Henry Wright
    Moderator

    @henrywright

    wp_delete_user() is the function that can be used to delete users. Be vary careful when using it because once a user has been deleted, there’s no way of restoring their account unless you’ve taken a database backup.

    You’d need to generate a list of the user IDs you’d like to delete and then loop through them, using wp_delete_user() to delete the current user in the loop.

    I know this isn’t a full solution, but hopefully it’ll show you what’ll need to be done.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Auto delete unactivated user’ is closed to new replies.
Skip to toolbar