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
|
<?php
// $Id$
/*
* $Log$
* Revision 1.1.2.2 2009/06/27 07:22:52 mfu
* Fixed #503718 by m.fu : htpassword corruption when enabling/disabling user
* Fixed #437904 by fasdalf@fasdalf.ru : group file not generated properly,
* now happen on after_update
* Fixed #437844 by fasdalf@fasdalf.ru : error when deleting one user
* Fixed #503726 by m.fu: group file no longer contain disabled users
* Added #503720 by m.fu : option to overwrite htpasswd
* Fixed #503724 by m.fu : validation of username, must be htpasswd compatible
*
* Revision 1.1.2.1 2009/03/25 19:24:10 mfu
* Fixed #409406 by fasdalf@fasdalf.ru : remove comma in htgroup file
*
*
*/
/* @file
* installation declaration for htpasswdsync module
*
*/
function htpasswdsync_install() {
drupal_install_schema('htpasswdsync_db');
}
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');
}
function htpasswdsync_db_schema() {
$schema['htpasswdsync_passwd'] = array(
'fields' => array(
'username' => array(
'description' => 'The {users}.username.',
'type' => 'varchar',
'length' => 33,
'not null' => TRUE,
'default' => 0,
),
'passwd' => array(
'description' => 'The crypted (crypt) password.',
'type' => 'varchar',
'length' => 33,
'not null' => TRUE,
'default' => '',
),
),
'primary key' => array('username'),
);
return $schema;
}
|