You are here

function ldap_servers_update_7106 in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 7.2 ldap_servers/ldap_servers.install \ldap_servers_update_7106()
  2. 7 ldap_servers/ldap_servers.install \ldap_servers_update_7106()

add account_name_attr field to ldap_servers table

File

ldap_servers/ldap_servers.install, line 261
Install, update and uninstall functions for the LDAP API module.

Code

function ldap_servers_update_7106() {
  if (!db_field_exists('ldap_servers', 'account_name_attr')) {
    db_add_field('ldap_servers', 'account_name_attr', array(
      'description' => 'The attribute to be used as the account name if not the user_attr',
      'type' => 'varchar',
      'length' => 255,
      'not null' => FALSE,
      'default' => '',
    ));
    $msg = t('"account_name_attr" field added to ldap_servers table');
  }
  return $msg ? $msg : t('No database changes made.');
}