~ubuntu-branches/ubuntu/jaunty/drupal6/jaunty-updates

« back to all changes in this revision

Viewing changes to modules/user/user.install

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano, Luigi Gangitano
  • Date: 2009-02-16 19:37:31 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090216193731-enpurcvayhavzug0
Tags: 6.9-1
[ Luigi Gangitano ]  
* New upstream release
  - Removed security patch integrate upstream
    + 12_SA-2008-073
    + 13_SA-CORE-2009-001

* debian/cron.sh
  - Handle sites/all correctly (Closes: #513522)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Id: user.install,v 1.5 2008/01/08 07:46:41 goba Exp $
 
2
// $Id: user.install,v 1.5.2.1 2009/01/06 15:46:38 goba Exp $
3
3
 
4
4
/**
5
5
 * Implementation of hook_schema().
6
6
 */
7
7
function user_schema() {
8
8
  $schema['access'] = array(
9
 
    'description' => t('Stores site access rules.'),
 
9
    'description' => 'Stores site access rules.',
10
10
    'fields' => array(
11
11
      'aid' => array(
12
12
        'type' => 'serial',
13
13
        'not null' => TRUE,
14
 
        'description' => t('Primary Key: Unique access ID.'),
 
14
        'description' => 'Primary Key: Unique access ID.',
15
15
      ),
16
16
      'mask' => array(
17
17
        'type' => 'varchar',
18
18
        'length' => 255,
19
19
        'not null' => TRUE,
20
20
        'default' => '',
21
 
        'description' => t('Text mask used for filtering access.'),
 
21
        'description' => 'Text mask used for filtering access.',
22
22
      ),
23
23
      'type' => array(
24
24
        'type' => 'varchar',
25
25
        'length' => 255,
26
26
        'not null' => TRUE,
27
27
        'default' => '',
28
 
        'description' => t('Type of access rule: name, mail or host.'),
 
28
        'description' => 'Type of access rule: name, mail or host.',
29
29
      ),
30
30
      'status' => array(
31
31
        'type' => 'int',
32
32
        'not null' => TRUE,
33
33
        'default' => 0,
34
34
        'size' => 'tiny',
35
 
        'description' => t('Whether rule is to allow(1) or deny(0) access.'),
 
35
        'description' => 'Whether rule is to allow(1) or deny(0) access.',
36
36
      ),
37
37
    ),
38
38
    'primary key' => array('aid'),
39
39
  );
40
40
 
41
41
  $schema['authmap'] = array(
42
 
    'description' => t('Stores distributed authentication mapping.'),
 
42
    'description' => 'Stores distributed authentication mapping.',
43
43
    'fields' => array(
44
44
      'aid' => array(
45
 
        'description' => t('Primary Key: Unique authmap ID.'),
 
45
        'description' => 'Primary Key: Unique authmap ID.',
46
46
        'type' => 'serial',
47
47
        'unsigned' => TRUE,
48
48
        'not null' => TRUE,
51
51
        'type' => 'int',
52
52
        'not null' => TRUE,
53
53
        'default' => 0,
54
 
        'description' => t("User's {users}.uid."),
 
54
        'description' => "User's {users}.uid.",
55
55
      ),
56
56
      'authname' => array(
57
57
        'type' => 'varchar',
58
58
        'length' => 128,
59
59
        'not null' => TRUE,
60
60
        'default' => '',
61
 
        'description' => t('Unique authentication name.'),
 
61
        'description' => 'Unique authentication name.',
62
62
      ),
63
63
      'module' => array(
64
64
        'type' => 'varchar',
65
65
        'length' => 128,
66
66
        'not null' => TRUE,
67
67
        'default' => '',
68
 
        'description' => t('Module which is controlling the authentication.'),
 
68
        'description' => 'Module which is controlling the authentication.',
69
69
      ),
70
70
    ),
71
71
    'unique keys' => array('authname' => array('authname')),
73
73
  );
74
74
 
75
75
  $schema['permission'] = array(
76
 
    'description' => t('Stores permissions for users.'),
 
76
    'description' => 'Stores permissions for users.',
77
77
    'fields' => array(
78
78
      'pid' => array(
79
79
        'type' => 'serial',
80
80
        'not null' => TRUE,
81
 
        'description' => t('Primary Key: Unique permission ID.'),
 
81
        'description' => 'Primary Key: Unique permission ID.',
82
82
      ),
83
83
      'rid' => array(
84
84
        'type' => 'int',
85
85
        'unsigned' => TRUE,
86
86
        'not null' => TRUE,
87
87
        'default' => 0,
88
 
        'description' => t('The {role}.rid to which the permissions are assigned.'),
 
88
        'description' => 'The {role}.rid to which the permissions are assigned.',
89
89
      ),
90
90
      'perm' => array(
91
91
        'type' => 'text',
92
92
        'not null' => FALSE,
93
93
        'size' => 'big',
94
 
        'description' => t('List of permissions being assigned.'),
 
94
        'description' => 'List of permissions being assigned.',
95
95
      ),
96
96
      'tid' => array(
97
97
        'type' => 'int',
98
98
        'unsigned' => TRUE,
99
99
        'not null' => TRUE,
100
100
        'default' => 0,
101
 
        'description' => t('Originally intended for taxonomy-based permissions, but never used.'),
 
101
        'description' => 'Originally intended for taxonomy-based permissions, but never used.',
102
102
      ),
103
103
    ),
104
104
    'primary key' => array('pid'),
106
106
  );
107
107
 
108
108
  $schema['role'] = array(
109
 
    'description' => t('Stores user roles.'),
 
109
    'description' => 'Stores user roles.',
110
110
    'fields' => array(
111
111
      'rid' => array(
112
112
        'type' => 'serial',
113
113
        'unsigned' => TRUE,
114
114
        'not null' => TRUE,
115
 
        'description' => t('Primary Key: Unique role id.'),
 
115
        'description' => 'Primary Key: Unique role id.',
116
116
      ),
117
117
      'name' => array(
118
118
        'type' => 'varchar',
119
119
        'length' => 64,
120
120
        'not null' => TRUE,
121
121
        'default' => '',
122
 
        'description' => t('Unique role name.'),
 
122
        'description' => 'Unique role name.',
123
123
      ),
124
124
    ),
125
125
    'unique keys' => array('name' => array('name')),
127
127
  );
128
128
 
129
129
  $schema['users'] = array(
130
 
    'description' => t('Stores user data.'),
 
130
    'description' => 'Stores user data.',
131
131
    'fields' => array(
132
132
      'uid' => array(
133
133
        'type' => 'serial',
134
134
        'unsigned' => TRUE,
135
135
        'not null' => TRUE,
136
 
        'description' => t('Primary Key: Unique user ID.'),
 
136
        'description' => 'Primary Key: Unique user ID.',
137
137
      ),
138
138
      'name' => array(
139
139
        'type' => 'varchar',
140
140
        'length' => 60,
141
141
        'not null' => TRUE,
142
142
        'default' => '',
143
 
        'description' => t('Unique user name.'),
 
143
        'description' => 'Unique user name.',
144
144
      ),
145
145
      'pass' => array(
146
146
        'type' => 'varchar',
147
147
        'length' => 32,
148
148
        'not null' => TRUE,
149
149
        'default' => '',
150
 
        'description' => t("User's password (md5 hash)."),
 
150
        'description' => "User's password (md5 hash).",
151
151
      ),
152
152
      'mail' => array(
153
153
        'type' => 'varchar',
154
154
        'length' => 64,
155
155
        'not null' => FALSE,
156
156
        'default' => '',
157
 
        'description' => t("User's email address."),
 
157
        'description' => "User's email address.",
158
158
      ),
159
159
      'mode' => array(
160
160
        'type' => 'int',
161
161
        'not null' => TRUE,
162
162
        'default' => 0,
163
163
        'size' => 'tiny',
164
 
        'description' => t('Per-user comment display mode (threaded vs. flat), used by the {comment} module.'),
 
164
        'description' => 'Per-user comment display mode (threaded vs. flat), used by the {comment} module.',
165
165
      ),
166
166
      'sort' => array(
167
167
        'type' => 'int',
168
168
        'not null' => FALSE,
169
169
        'default' => 0,
170
170
        'size' => 'tiny',
171
 
        'description' => t('Per-user comment sort order (newest vs. oldest first), used by the {comment} module.'),
 
171
        'description' => 'Per-user comment sort order (newest vs. oldest first), used by the {comment} module.',
172
172
      ),
173
173
      'threshold' => array(
174
174
        'type' => 'int',
175
175
        'not null' => FALSE,
176
176
        'default' => 0,
177
177
        'size' => 'tiny',
178
 
        'description' => t('Previously used by the {comment} module for per-user preferences; no longer used.'),
 
178
        'description' => 'Previously used by the {comment} module for per-user preferences; no longer used.',
179
179
      ),
180
180
      'theme' => array(
181
181
        'type' => 'varchar',
182
182
        'length' => 255,
183
183
        'not null' => TRUE,
184
184
        'default' => '',
185
 
        'description' => t("User's default theme."),
 
185
        'description' => "User's default theme.",
186
186
      ),
187
187
      'signature' => array(
188
188
        'type' => 'varchar',
189
189
        'length' => 255,
190
190
        'not null' => TRUE,
191
191
        'default' => '',
192
 
        'description' => t("User's signature."),
 
192
        'description' => "User's signature.",
193
193
      ),
194
194
      'created' => array(
195
195
        'type' => 'int',
196
196
        'not null' => TRUE,
197
197
        'default' => 0,
198
 
        'description' => t('Timestamp for when user was created.'),
 
198
        'description' => 'Timestamp for when user was created.',
199
199
      ),
200
200
      'access' => array(
201
201
        'type' => 'int',
202
202
        'not null' => TRUE,
203
203
        'default' => 0,
204
 
        'description' => t('Timestamp for previous time user accessed the site.'),
 
204
        'description' => 'Timestamp for previous time user accessed the site.',
205
205
      ),
206
206
      'login' => array(
207
207
        'type' => 'int',
208
208
        'not null' => TRUE,
209
209
        'default' => 0,
210
 
        'description' => t("Timestamp for user's last login."),
 
210
        'description' => "Timestamp for user's last login.",
211
211
      ),
212
212
      'status' => array(
213
213
        'type' => 'int',
214
214
        'not null' => TRUE,
215
215
        'default' => 0,
216
216
        'size' => 'tiny',
217
 
        'description' => t('Whether the user is active(1) or blocked(0).'),
 
217
        'description' => 'Whether the user is active(1) or blocked(0).',
218
218
      ),
219
219
      'timezone' => array(
220
220
        'type' => 'varchar',
221
221
        'length' => 8,
222
222
        'not null' => FALSE,
223
 
        'description' => t("User's timezone."),
 
223
        'description' => "User's timezone.",
224
224
      ),
225
225
      'language' => array(
226
226
        'type' => 'varchar',
227
227
        'length' => 12,
228
228
        'not null' => TRUE,
229
229
        'default' => '',
230
 
        'description' => t("User's default language."),
 
230
        'description' => "User's default language.",
231
231
      ),
232
232
      'picture' => array(
233
233
        'type' => 'varchar',
234
234
        'length' => 255,
235
235
        'not null' => TRUE,
236
236
        'default' => '',
237
 
        'description' => t("Path to the user's uploaded picture."),
 
237
        'description' => "Path to the user's uploaded picture.",
238
238
      ),
239
239
      'init' => array(
240
240
        'type' => 'varchar',
241
241
        'length' => 64,
242
242
        'not null' => FALSE,
243
243
        'default' => '',
244
 
        'description' => t('Email address used for initial account creation.'),
 
244
        'description' => 'Email address used for initial account creation.',
245
245
      ),
246
246
      'data' => array(
247
247
        'type' => 'text',
248
248
        'not null' => FALSE,
249
249
        'size' => 'big',
250
 
        'description' => t('A serialized array of name value pairs that are related to the user. Any form values posted during user edit are stored and are loaded into the $user object during user_load(). Use of this field is discouraged and it will likely disappear in a future version of Drupal.'),
 
250
        'description' => 'A serialized array of name value pairs that are related to the user. Any form values posted during user edit are stored and are loaded into the $user object during user_load(). Use of this field is discouraged and it will likely disappear in a future version of Drupal.',
251
251
      ),
252
252
    ),
253
253
    'indexes' => array(
262
262
  );
263
263
 
264
264
  $schema['users_roles'] = array(
265
 
    'description' => t('Maps users to roles.'),
 
265
    'description' => 'Maps users to roles.',
266
266
    'fields' => array(
267
267
      'uid' => array(
268
268
        'type' => 'int',
269
269
        'unsigned' => TRUE,
270
270
        'not null' => TRUE,
271
271
        'default' => 0,
272
 
        'description' => t('Primary Key: {users}.uid for user.'),
 
272
        'description' => 'Primary Key: {users}.uid for user.',
273
273
      ),
274
274
      'rid' => array(
275
275
        'type' => 'int',
276
276
        'unsigned' => TRUE,
277
277
        'not null' => TRUE,
278
278
        'default' => 0,
279
 
        'description' => t('Primary Key: {role}.rid for role.'),
 
279
        'description' => 'Primary Key: {role}.rid for role.',
280
280
      ),
281
281
    ),
282
282
    'primary key' => array('uid', 'rid'),