forked from wet-boew/wet-boew-drupal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wetkit.install
71 lines (66 loc) · 1.74 KB
/
wetkit.install
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/**
* @file
* Code for the wetkit.install file.
*/
/**
* Implements hook_install().
*
* Perform actions to set up the site for this profile.
*/
function wetkit_install() {
/**
* Default configuration for contrib modules.
*
* Here we do any database related configuration for included modules. These
* points of configuration includes both custom db queries and
* variable_set(). The only variable's that should be done in here are ones
* that require an array of data to be set. Variables that have a single entry (not an
* array) should be set in guardr.info under the settings section.
*
*/
/**
* Set password_policy module defaults.
*/
$policy = array();
$policy = array(
'complexity' => 3,
'delay' => 0,
'digit_placement' => 2,
'history' => 24,
'length' => 8,
'letter' => 2,
'username' => 1,
);
$pid = db_insert('password_policy')
->fields(array(
'name' => 'WetKit Default',
'description' => 'The default password policy implementation included with the WetKit distribution.',
'policy' => serialize($policy),
'enabled' => 1,
'expiration' => '90',
'warning' => '7, 14',
'created' => REQUEST_TIME,
))
->execute();
//Enable authenticated role the above for the default password policy.
db_insert('password_policy_role')
->fields(array(
'pid' => $pid,
'rid' => 2,
))
->execute();
/**
* Only notify on Security Issue(s)
*/
variable_set('update_notification_threshold', array('security'));
/**
* Set Admin Theme
*/
db_update('system')
->fields(array('status' => 1))
->condition('type', 'theme')
->condition('name', 'wetkit_rubik')
->execute();
variable_set('admin_theme', 'wetkit_rubik');
}