You are here

function ldap_servers_update_7105 in Lightweight Directory Access Protocol (LDAP) 7

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

add account_name_attr field to ldap_servers table

File

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

Code

function ldap_servers_update_7105() {
  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,
    ));
    $msg = t('"account_name_attr" field added to ldap_servers table');
  }
  return $msg ? $msg : t('No database changes made.');
}