1

If a user cancels their account on a Drupal 7 site, is there a way to allow them to re-activate their account without requiring administrator intervention?

If a user has second thoughts and wants to rejoin the site using the same e-mail address, I would like to make it easy for them. I have set the Account cancellation method to Disable the account but keep the content.

  • 1
    If a user tries to register an account using the email used from a blocked account, the user will get an error about using an email already in use, and get a link to reset the password, but resetting the password doesn't work for blocked accounts. I didn't find a module that re-enables an account when a user tries to register using the email address already used from a blocked account. – kiamlaluno Apr 28 '13 at 21:37
1

There are two URL which can help you in achieving this. First you will have to use Advance User module & then you can extends some hooks of it according to your need for account re-activation. There is a blog written on similar issue which may help you - Enable/Disable User.

I hope you find your solution.

0

You should use hook_user_cancel_methods_alter for this. Later on I think when user wants to reactivate his/her account. It will active.

  • Could you explain more? It's not clear to me how using that hook would allow users to reactivate their accounts. – Patrick Kenny Apr 29 '13 at 14:09
0

I ended up doing this using the Rules and Flag modules. I created a per-user flag, "Cancel my account," and the made some rules that would automatically unpublish all content posted by a user if and only if that user flagged himself/herself. I then created another set of rules to re-publish everything if the user then unflagged the "Cancel my account" flag on himself/herself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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