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
|
<?php
/**
* Install plugin
* @return void
*/
function htpasswdsync_install() {
drupal_install_schema('htpasswdsync_db');
}
/**
* Uninstall plugin
* @return void
*/
function htpasswdsync_uninstall() {
drupal_uninstall_schema('htpasswdsync_db');
variable_del('htpasswdsync_htpasswd');
variable_del('htpasswdsync_htgroup');
variable_del('htpasswdsync_roles');
variable_del('htpasswdsync_hash');
variable_del('htpasswdsync_cron_time');
variable_del('htpasswdsync_overwrite');
variable_del('htpasswdsync_names_lowercase');
variable_del('htpasswdsync_names_without_whitespace');
}
/**
* Returns module database schema specification
* @return array
*/
function htpasswdsync_db_schema() {
$schema['htpasswdsync_passwd'] = array(
'fields' => array(
'username' => array(
'description' => 'The {users}.username.',
'type' => 'varchar',
'length' => 64,
'not null' => true,
'default' => 0,
),
'passwd' => array(
'description' => 'The crypted (crypt) password.',
'type' => 'varchar',
'length' => 64,
'not null' => true,
'default' => '',
),
),
'primary key' => array('username'),
);
return $schema;
}
?>
|