function user_update_7005

Changes the users table to allow longer e-mail addresses.

Related topics

File

modules/user/user.install, line 587

Code

function user_update_7005(&$sandbox) {
    $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_drop_index('users', 'mail');
    db_change_field('users', 'mail', 'mail', $mail_field, array(
        'indexes' => array(
            'mail' => array(
                'mail',
            ),
        ),
    ));
    db_change_field('users', 'init', 'init', $init_field);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.