Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you try to run drush with this module installed, you'll get the unhelpful error message "Drush command terminated abnormally due to an unrecoverable error. " - this is because of the drupal_goto inside of the hook_init().
My fix was to include a call to drupal_is_cli() in the logic in that hook to check if the user needs to be verified.
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedWhich drush command are you trying to run? I am unable to reproduce the issue.
This could be a duplicate of https://www.drupal.org/node/2071843, which was fixed with drupal_is_cli() and php_sapi_name() - double check to make sure you have up to date code for the module.
Thanks!
-Jeff