You are here

function ldapauth_install in LDAP integration 5.2

Same name and namespace in other branches
  1. 5 ldapauth.install \ldapauth_install()
  2. 6 ldapauth.install \ldapauth_install()

Implementation of hook_install().

File

./ldapauth.install, line 5

Code

function ldapauth_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {ldapauth} (\n\t\t\t\tsid  int NOT NULL auto_increment,\n\t\t\t\tname varchar(255) NOT NULL default '',\n\t\t\t\tstatus int NOT NULL default '0',\n\t\t\t\tserver varchar(255) NOT NULL default '',\n\t\t\t\tport int(10) NOT NULL default '389',\n\t\t\t\ttls int NOT NULL default '0',\n\t\t\t\tencrypted int NOT NULL default '0',\n\t\t\t\tbasedn varchar(255) NOT NULL default '',\n\t\t\t\tuser_attr varchar(255) NOT NULL default '',\n\t\t\t\tbinddn varchar(255) NOT NULL default '',\n\t\t\t\tbindpw varchar(255) NOT NULL default '',\n\t\t\t\tbindpw_clear varchar(255) NOT NULL default '',\n\t\t\t\tldap_groups_in_dn int NOT NULL default '0',\n\t\t\t\tldap_groups_in_dn_desc int NOT NULL default '0',\n\t\t\t\tldap_group_dn_attribute varchar(255) default '',\n\t\t\t\tldap_group_attr varchar(255) default '',\n\t\t\t\tldap_groups_in_attr int NOT NULL default '0',\n\t\t\t\tldap_groups_as_entries int NOT NULL default '0',\n\t\t\t\tldap_group_entries varchar(255) default '',\n\t\t\t\tldap_group_entries_attribute varchar(255) default '',\n        PRIMARY KEY (name),\n        KEY sid (sid)\n      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
      break;
  }
}