You are here

function ldap_authorization_update_7203 in Lightweight Directory Access Protocol (LDAP) 7.2

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

Make all schema field names lowercase in ldap server to deal with cronic case sensitivity issues.

File

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

Code

function ldap_authorization_update_7203() {
  if (db_field_exists('ldap_authorization', 'searchAll')) {
    db_drop_field('ldap_authorization', 'searchAll');
  }
  $schema = ldap_authorization_schema();
  $field_schema = $schema['ldap_authorization']['fields']['use_first_attr_as_groupid'];
  if (db_field_exists('ldap_authorization', 'useFirstAttrAsGroupId')) {
    if (db_field_exists('ldap_authorization', 'use_first_attr_as_groupid')) {
      db_drop_field('ldap_authorization', 'useFirstAttrAsGroupId');
    }
    else {
      db_change_field('ldap_authorization', 'useFirstAttrAsGroupId', 'use_first_attr_as_groupid', $field_schema);
    }
  }
}