You are here

function ldap_authorization_requirements in Lightweight Directory Access Protocol (LDAP) 7

Same name and namespace in other branches
  1. 8.2 ldap_authorization/ldap_authorization.install \ldap_authorization_requirements()
  2. 7.2 ldap_authorization/ldap_authorization.install \ldap_authorization_requirements()

Implements hook_requirements().

File

ldap_authorization/ldap_authorization.install, line 12
Install, update and uninstall functions for the LDAP authorization module.

Code

function ldap_authorization_requirements($phase) {
  $requirements = array();
  if ($phase != "install" && db_field_exists('ldapauth', 'ldapgroups_in_dn')) {
    $requirements['ldap_authorization_ldap_integration']['title'] = t('LDAP Integration LDAP Groups Upgrade Concern');
    $requirements['ldap_authorization_ldap_integration']['severity'] = REQUIREMENT_WARNING;
    $requirements['ldap_authorization_ldap_integration']['value'] = NULL;
    $requirements['ldap_authorization_ldap_integration']['description'] = t('Upgrade from Drupal 6 LDAP Groups to Drupal 7
      LDAP Authorization is not automatic.  LDAP Authorization will need to be configured by hand.
      The authorization options are different and automated updgrade is not possible.
      See also. See http://drupal.org/node/1023016, http://drupal.org/node/1183192.
      This message will go away when the ldapauth database table is removed.');
  }

  // check that ldapauth not installed.
  return $requirements;
}