Skip to content
Snippets Groups Projects
Commit 38082fe4 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #809132 by marcingy, andypost: increase size of init field on users...

- Patch #809132 by marcingy, andypost: increase size of init field on users table to 254 characters and add missing index.
parent 4e242467
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -144,7 +144,7 @@ function user_schema() { ...@@ -144,7 +144,7 @@ function user_schema() {
'length' => 254, 'length' => 254,
'not null' => FALSE, 'not null' => FALSE,
'default' => '', 'default' => '',
'description' => "User's email address.", 'description' => "User's e-mail address.",
), ),
'theme' => array( 'theme' => array(
'type' => 'varchar', 'type' => 'varchar',
...@@ -206,10 +206,10 @@ function user_schema() { ...@@ -206,10 +206,10 @@ function user_schema() {
), ),
'init' => array( 'init' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 64, 'length' => 254,
'not null' => FALSE, 'not null' => FALSE,
'default' => '', 'default' => '',
'description' => 'Email address used for initial account creation.', 'description' => 'E-mail address used for initial account creation.',
), ),
'data' => array( 'data' => array(
'type' => 'text', 'type' => 'text',
...@@ -548,11 +548,25 @@ function user_update_7004(&$sandbox) { ...@@ -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) { function user_update_7005(&$sandbox) {
$schema = user_schema(); $mail_field = array(
db_change_field('users', 'mail', 'mail', $schema['users']['fields']['mail']); '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);
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment