Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The size of the email field was increased in [#502968: Increase maximum allowable length of email addresses] however as init is set to the email entered by a user before a new user is created email address above 64 characters still can not be entered. This patch updates init to be 254 the same as email address to allow for email address above 64 characters to be entered.
Marking as critical as otherwise new feature introduced in above issue continues to be useless.
Comment | File | Size | Author |
---|---|---|---|
#19 | increase-init-length-3.patch | 1.86 KB | marcingy |
#17 | increase-init-length-3.patch | 1.92 KB | marcingy |
#15 | increase-init-length-3.patch | 1.92 KB | marcingy |
#6 | 809132-user-init-d7.patch | 1.47 KB | andypost |
#5 | 809132-user-init-d7.patch | 1.46 KB | andypost |
Comments
Comment #1
andypostDo not use hook_schema() from within hook_update_N() http://drupal.org/node/150220
So both fields' changed are placed within user_update_7005()
Comment #2
marcingy CreditAttribution: marcingy commentedPatch in #1 doesn't change the size of the field and doesn't change the init field size in hook_schema
Comment #3
marcingy CreditAttribution: marcingy commentedReroll that updates field length and incorporates the changes in #1.
Comment #4
andypost@marcingy Yes, I forget about this change.
patch is trivial so RTBC
Comment #5
andypostSame patch but doc-block comment trimmed to standard.
Comment #6
andypostGrrr wrong patch...
Comment #7
marcingy CreditAttribution: marcingy commentedNew doc block looks good not sure if we second a opinion but I'll mark it rbtc on account @andypost was gave it the thumbs up in #4.
Comment #8
andypost@marcingy About #5 read more at Coding standards and about Doxygen http://drupal.org/node/1354#functions
Comment #9
andypostAlso it's could be great if you add comment about why 254 chars was chosen from #502968: Increase maximum allowable length of email addresses
Comment #10
marcingy CreditAttribution: marcingy commentedSee the original comment for the issue clearly states why. And note the original doxygen was reviewed and accepted as part of an earlier patch hence my reason for not amending it.
Comment #11
marcingy CreditAttribution: marcingy commentedComment #12
aspilicious CreditAttribution: aspilicious commented+ * Change the users table to allow longer email addresses.
Please change the verb to "changes".
I know there are a lot of places in core not following the standard but we try to do our best with new patches.
Comment #13
Dries CreditAttribution: Dries commentedI'm OK with this change. In Drupal, we tend to write 'e-mail' instead of 'email' though.
Comment #14
Damien Tournoud CreditAttribution: Damien Tournoud commentedWhile we are at it: db_change_field() mandate that you drop and recreate the indexes on the changed fields. We have an index on 'mail', so the code should read:
Comment #15
marcingy CreditAttribution: marcingy commentedNew version taking into account comments above
* Fixes verbage
* amends email to e-mail
* adds a reference to the original discussion node
* creates the index in hook update
Comment #16
aspilicious CreditAttribution: aspilicious commentedIf you going to add the reference, you have to put a newline between the first sentence of the docblock and the see
+ * Changes the users table to allow longer e-mail addresses.
+ * See http://drupal.org/node/502968 for further discussion.
Comment #17
marcingy CreditAttribution: marcingy commentedReroll with #16
Comment #18
catchWe don't usually put links to issues in code comments - otherwise we'd have thousands of them, and cvs annotate lets you find the issue with a bit of work, apart from that looks RTBC although I didn't test it.
Comment #19
marcingy CreditAttribution: marcingy commentedHopefully one last time....;)
Comment #20
catchComment #21
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. I'm moving this to HEAD 2 HEAD.
Comment #22
David_Rothstein CreditAttribution: David_Rothstein commentedLet's not move core issues to the queue of a module that about 5 people are using :) Instead we can just create separate issues in Head to Head and crosslink them. (Most people probably aren't interested in the Head to Head issue, and moving it there also prevents the core change from being widely visible or easily reopened for any necessary followups that might arise.)
In this case, @catch already opened a Head to Head issue preemptively anyway:
#809428: {users}.init length
I've posted a patch there.