You are here

function ldap_authorization_update_7108 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_7108()
  2. 7 ldap_authorization/ldap_authorization.install \ldap_authorization_update_7108()

Add derive_from_entry_entries_attr field to allow user specification of attribute representing group in queries.

File

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

Code

function ldap_authorization_update_7108() {
  if (!db_field_exists('ldap_authorization', 'derive_from_entry_entries_attr')) {
    db_add_field('ldap_authorization', 'derive_from_entry_entries_attr', [
      'type' => 'varchar',
      'length' => 255,
      'default' => NULL,
    ]);
    return t('"derive_from_entry_entries_attr" field added to ldap_authorization table');
  }
  else {
    return t('No database changes made.');
  }
  _ldap_authorization_add_ldap_user_fields();
}