-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathrune.install
More file actions
28 lines (24 loc) · 829 Bytes
/
rune.install
File metadata and controls
28 lines (24 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
* @file Install hooks for the Rune installation profile.
*/
/**
* Implements hook_install().
*/
function rune_install() {
// Create a default role for site administrators, with all available permissions assigned.
$admin_role = new stdClass();
$admin_role->name = 'administrator';
$admin_role->weight = 2;
user_role_save($admin_role);
user_role_grant_permissions($admin_role->rid, array_keys(module_invoke_all('permission')));
// Set this as the administrator role.
variable_set('user_admin_role', $admin_role->rid);
// Assign user 1 the "administrator" role.
db_insert('users_roles')
->fields(array('uid' => 1, 'rid' => $admin_role->rid))
->execute();
theme_enable(array('adminimal', 'bootstrap'));
variable_set('theme_default', 'bootstrap');
theme_disable(array('bartik'));
}