You are here

function ldapdata_install in LDAP integration 5

Same name and namespace in other branches
  1. 6 ldapdata.install \ldapdata_install()

Implementation of hook_install().

File

./ldapdata.install, line 5

Code

function ldapdata_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("ALTER TABLE {ldapauth} ADD (\n        ldapdata_binddn VARCHAR(255) NOT NULL default '',\n        ldapdata_bindpw VARCHAR(255) NOT NULL default '',\n        ldapdata_bindpw_clear VARCHAR(2) NOT NULL default '',\n        ldapdata_rwattrs LONGTEXT NOT NULL default '', \n      \tldapdata_roattrs LONGTEXT NOT NULL default '', \n        ldapdata_mappings LONGTEXT NOT NULL default ''\n      )");
      break;
    case 'pgsql':
      db_query("ALTER TABLE {ldapauth} ADD (\n        ldapdata_binddn VARCHAR(255) NOT NULL default '',\n        ldapdata_bindpw VARCHAR(255) NOT NULL default '',\n        ldapdata_bindpw_clear VARCHAR(2) NOT NULL default '',\n        ldapdata_rwattrs TEXT NOT NULL, \n        ldapdata_roattrs TEXT NOT NULL, \n        ldapdata_mappings TEXT NOT NULL\n      )");
      break;
  }
}