email_registration.install 969 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * @file
  4. * Checks requirements for the email_registration.module.
  5. */
  6. /**
  7. * Implements hook_requirements().
  8. */
  9. function email_registration_requirements() {
  10. $t = get_t();
  11. $requirements = array();
  12. if (module_exists('logintoboggan') && variable_get('logintoboggan_login_with_email', 0)) {
  13. $requirements['email_registration'] = array(
  14. 'title' => $t('Email Registration / LoginToboggan Conflict'),
  15. 'value' => $t('Conflict'),
  16. 'description' => $t('There is a conflict between %email_registration and %logintoboggan. You should disable the "Allow users to login using their e-mail address" option from %logintoboggan.', array('%email_registration' => 'Email registration', '%logintoboggan' => 'Login Toboggan')),
  17. 'severity' => REQUIREMENT_ERROR,
  18. );
  19. }
  20. return $requirements;
  21. }
  22. /**
  23. * Implements hook_uninstall().
  24. */
  25. function email_registration_uninstall() {
  26. variable_del('email_registration_login_with_username');
  27. }