function subuser_install in Subuser 5
Same name and namespace in other branches
- 6 subuser.install \subuser_install()
File
- ./
subuser.install, line 4
Code
function subuser_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query('CREATE TABLE {subuser} (
uid INT NOT NULL,
refuid INT NOT NULL,
PRIMARY KEY(uid)
) /*!40100 DEFAULT CHARACTER SET utf8 */;');
//
db_query("INSERT INTO {role} (name) VALUES ('%s')", "subuser");
variable_set("subuser_roleid", db_insert_id());
break;
case 'pgsql':
db_query('CREATE TABLE {subuser} (
uid INT NOT NULL,
refuid INT NOT NULL,
PRIMARY KEY(uid)
)');
break;
}
}