summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-05-26 19:48:45 +0000
committerDries Buytaert <dries@buytaert.net>2010-05-26 19:48:45 +0000
commit38082fe41487ebb683d3546c7e9738a722d5459c (patch)
treedd905f6ae72dd4618b45c9be25efe95985f54d95
parent4e2424672319452679fb7a05837ade65c0d1f868 (diff)
downloadbrdo-38082fe41487ebb683d3546c7e9738a722d5459c.tar.gz
brdo-38082fe41487ebb683d3546c7e9738a722d5459c.tar.bz2
- Patch #809132 by marcingy, andypost: increase size of init field on users table to 254 characters and add missing index.
-rw-r--r--modules/user/user.install26
1 files changed, 20 insertions, 6 deletions
diff --git a/modules/user/user.install b/modules/user/user.install
index aef0f9fb9..820cb6943 100644
--- a/modules/user/user.install
+++ b/modules/user/user.install
@@ -144,7 +144,7 @@ function user_schema() {
'length' => 254,
'not null' => FALSE,
'default' => '',
- 'description' => "User's email address.",
+ 'description' => "User's e-mail address.",
),
'theme' => array(
'type' => 'varchar',
@@ -206,10 +206,10 @@ function user_schema() {
),
'init' => array(
'type' => 'varchar',
- 'length' => 64,
+ 'length' => 254,
'not null' => FALSE,
'default' => '',
- 'description' => 'Email address used for initial account creation.',
+ 'description' => 'E-mail address used for initial account creation.',
),
'data' => array(
'type' => 'text',
@@ -548,11 +548,25 @@ function user_update_7004(&$sandbox) {
}
/**
- * Change the users table to allow longer email addresses - 254 characters instead of 64.
+ * Changes the users table to allow longer e-mail addresses.
*/
function user_update_7005(&$sandbox) {
- $schema = user_schema();
- db_change_field('users', 'mail', 'mail', $schema['users']['fields']['mail']);
+ $mail_field = array(
+ 'type' => 'varchar',
+ 'length' => 254,
+ 'not null' => FALSE,
+ 'default' => '',
+ 'description' => "User's e-mail address.",
+ );
+ $init_field = array(
+ 'type' => 'varchar',
+ 'length' => 254,
+ 'not null' => FALSE,
+ 'default' => '',
+ 'description' => 'E-mail address used for initial account creation.',
+ );
+ db_change_field('users', 'mail', 'mail', $mail_field, array('indexes' => array('mail' => array('mail'))));
+ db_change_field('users', 'init', 'init', $init_field);
}
/**