domain_user.install in Domain Access 5
Same filename and directory in other branches
Install file for the Domain User module
File
domain_user/domain_user.installView source
<?php
/**
* @file
* Install file for the Domain User module
*/
/**
* Implement hook_install()
*
* @ingroup drupal
*/
function domain_user_install() {
switch ($GLOBALS['db_type']) {
case 'mysqli':
case 'mysql':
db_query("CREATE TABLE IF NOT EXISTS {domain_user} (\n domain_id int(11) NOT NULL default '0',\n uid int(11) NOT NULL default '0',\n INDEX (domain_id),\n INDEX (uid)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
break;
case 'pgsql':
db_query("CREATE TABLE {domain_user} (\n domain_id integer NOT NULL default 0,\n uid integer NOT NULL default 0\n )");
db_query("CREATE INDEX {domain_user}_domain_id_idx ON {domain_user} (domain_id)");
db_query("CREATE INDEX {domain_user}_uid_idx ON {domain_user} (uid)");
break;
}
}
/**
* Implement hook_uninstall()
*/
function domain_user_uninstall() {
// Drop the storage table.
db_query("DROP TABLE {domain_user}");
variable_del('domain_user');
variable_del('domain_user_root');
variable_del('domain_user_scheme');
variable_del('domain_user_login');
variable_del('domain_user_prefixing');
}
Functions
Name | Description |
---|---|
domain_user_install | Implement hook_install() |
domain_user_uninstall | Implement hook_uninstall() |