5

What do you do with unverified emails in Drupal? I see some have been unverified for several months.

Is it possible to resend the email or to auto delete them?

3

I think it is common for all sites that permit public registration but require email verification to get some "unverified" users.

To be honest, I do not think there is much point in resending the verification email. Some people are afraid of their email being harvested for spam purposes, so they register with a bogus or black-hole address they never read. Some may just be typos. And some may be spam-bots that know how to register, but don't have the AI to deal with verification. When learning to deal with this, I tried resending the verification email, but with no results. I think the important thing is to prevent those who use bogus or black-hole addresses from registering in the first place (spammers, like death and taxes, will always be with us).

This is how I deal with this now:

  1. I put text on the "Create new account" page that explain upfront that an verification email will be sent and response will be required - and that failure to comply with this within 48 hours will result in automatic account cancellation. I also have similar language in the body of the verification email that is sent out.

  2. I then cancel accounts that remain unverified after 48 hours.

You can cancel accounts in bulk on the Adminstration/People page. Sort on the column "Last access" and the unverified ones will appear on top. Then tick the ones that are unverified (it says "never" in the "Last access" column), and select "Cancel the selected user accounts" from the drop-down menu.

  • I have seen this comment several times: it is possible to cancel these accounts with automatic tools such as the LoginToboggan module. But I have never seen anyone explain just how. When I go to the admin page for logintoboggan, it is simplistic and there is no setting to delete inactive or never-activated accounts. – Cheeso Jan 31 '17 at 5:09
  • @Cheeso, thanks for pointing that out. I must admit I've never used LoginToboggan for account cancellations - so I've deleted the reference. (LoginToboggan is also mentioned in the answer by Mohammed Shameem.) – Free Radical Feb 1 '17 at 8:05
4

you should try the Logingtoboggon module. it has this feature

  1. Allow users to login using either their username OR their e-mail address.
  2. Allow users to login immediately.
  3. Provide a login form on Access Denied pages for non-logged-in (anonymous) users.
  4. The module provides two login block options: One uses JavaScript to display the form within the block immediately upon clicking "log in". The other brings the user to a separate page, but returns the user to their original page upon login.
  5. Customize the registration form with two e-mail fields to ensure accuracy.
  6. Optionally redirect the user to a specific page when using the 'immediate login' feature.
  7. Optionally redirect the user to a specific page upon validation of their e-mail address.
  8. Optionally display a user message indicating a successful login.
  9. Optionally combine both the login and registration form on one page.
  10. Optionally have unvalidated users purged from the system at a pre-defined interval (please read the CAVEATS section of INSTALL.txt for important information on configuring this feature!).
  11. Integrates with Rules module to do various tasks when a user validates via email validation process (see http://drupal.org/node/880904 for an example)

I have put the feature you are looking for in bold.

  • -1 because, having used this feature of Logintoboggan, I can say that it is experimental and does not work very well. The fact that there is a CAVEATS section in the module's readme is more evidence of this. – Patrick Kenny Feb 8 '13 at 13:07
  • But it could definitely be a starting point even to work out something on it to improve on it. Any way thanks for pointing out the fault. – Mohammed Shameem Feb 8 '13 at 13:50
3

It's possible to resend the verification email with PHP, using

_user_mail_notify

e.g:

_user_mail_notify('register_no_approval_required', $account);

see _user_mail_notify for other account mail types, e.g status_activated.

To auto-delete you can use

hook_cron

or perhaps also the Rules module, e.g system event "on cron" or as a Scheduled Rules component.

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.