You are here

email_registration.install in Email Registration 7

Same filename and directory in other branches
  1. 8 email_registration.install
  2. 5 email_registration.install

Checks requirements for the email_registration.module.

File

email_registration.install
View source
<?php

/**
 * @file
 * Checks requirements for the email_registration.module.
 */

/**
 * Implements hook_requirements().
 */
function email_registration_requirements() {
  $t = get_t();
  $requirements = array();
  if (module_exists('logintoboggan') && variable_get('logintoboggan_login_with_email', 0)) {
    $requirements['email_registration'] = array(
      'title' => $t('Email Registration / LoginToboggan Conflict'),
      'value' => $t('Conflict'),
      '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',
      )),
      'severity' => REQUIREMENT_ERROR,
    );
  }
  return $requirements;
}

/**
 * Implements hook_uninstall().
 */
function email_registration_uninstall() {
  variable_del('email_registration_login_with_username');
  variable_del('email_registration_email_field');
}