One solution is to remove all roles.

But the user will still be able to log in. Should we at the same time delete password?


Users "delete" their account and account is set to innactive in our system. 2 months later, the user want's to sign up again.

Since e-mail is already registered, he gets a message that the email exists.

What do we do now?

Well, if user request a new passord, he will get one. But he still doesn't have any user roles.

Doe anyone have any suggestions on how this may be solved?

  • How do your user roles work? Is it just one user role that needs to be applied, or are there varying user roles for various clients?
    – mor7ifer
    Commented Jan 20, 2012 at 15:36
  • Different custom roles, but they all have one base role. No one has WP roles (except me and my staff)
    – Steven
    Commented Jan 20, 2012 at 16:49
  • I'm not completely removing the user, because there is data linked to the user that will not be removed even if users deletes account. Thereore we only want to set the account to inactive and delete user data.
    – Steven
    Commented Jan 20, 2012 at 16:51
  • And inactive is a user role?
    – mor7ifer
    Commented Jan 20, 2012 at 17:21
  • No. I've not come up with a sensible idea how to set user inactive.
    – Steven
    Commented Jan 20, 2012 at 18:14

2 Answers 2


how about just setting user meta. Something like 'my_inactive' and set it to true, then you can evaluate by something like if( get_user_meta( $user, 'my_inactive' ) === true ) and have a quick way to check that without destroying any of the user privileges or anything. This will allow you to hook login and just prevent the user from accessing the backend, rather than changing any of their account settings. The way you would allow users to reactivate would be by adding a link to /wp-login.php which would send a reactivation request to you, and allow you to move from there (or just autoreactivate). If you need any sample code, let me know and I can whip something up. I'm not sure which hooks in particular you'd need off the top of my head, but I'm pretty sure most/all of them exist.


You can set the delete account to an "inactive" role. If they register again, simply set their user to one of the default roles in WP. You can create a role called "inactive" via a plugin.

for example: http://wordpress.org/extend/plugins/user-role-editor/


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.