function ldapgroups_install in LDAP integration 5
Same name and namespace in other branches
- 6 ldapgroups.install \ldapgroups_install()
Implementation of hook_install().
File
- ./
ldapgroups.install, line 5
Code
function ldapgroups_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("ALTER TABLE {ldapauth} ADD (\n ldap_groups_in_dn int NOT NULL default '0',\n ldap_groups_in_dn_desc int NOT NULL default '0',\n ldap_group_dn_attribute varchar(255) default '',\n ldap_group_attr varchar(255) default '',\n ldap_groups_in_attr int NOT NULL default '0',\n ldap_groups_as_entries int NOT NULL default '0',\n ldap_group_entries varchar(255) default '',\n ldap_group_entries_attribute varchar(255) default ''\n )");
break;
case 'pgsql':
db_query("ALTER TABLE {ldapauth} ADD (\n ldap_groups_in_dn INTEGER NOT NULL DEFAULT 0,\n ldap_groups_in_dn_desc INTEGER NOT NULL DEFAULT 0,\n ldap_group_dn_attribute VARCHAR(255) DEFAULT '',\n ldap_group_attr VARCHAR(255) DEFAULT '',\n ldap_groups_in_attr INTEGER NOT NULL DEFAULT 0,\n ldap_groups_as_entries INTEGER NOT NULL DEFAULT 0,\n ldap_group_entries VARCHAR(255) DEFAULT '',\n ldap_group_entries_attribute VARCHAR(255) DEFAULT ''\n )");
break;
}
}