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.
Hi, thanks for a great module!
Form field validation callback function email_registration_user_login_validate()
:
- Defines
$form, &$form_state
as parameters instead of$element, &$form_state, $form
, see https://api.drupal.org/api/drupal/developer%21topics%21forms_api_referen.... - Sets
$form_state['values']['email']
instead of the commonly used$form_state['values']['mail']
No big deals, but still worth mentioning.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2393189_incorrect_args_validate.patch | 685 bytes | greggles |
| |||
#2 | email_registration-removed-typos-2393189-1.patch | 1.6 KB | lmeurs |
Comments
Comment #1
lmeurs CreditAttribution: lmeurs commentedAttached patch.
Comment #2
lmeurs CreditAttribution: lmeurs commentedRerolled the patch for 7.x-1.3.
Comment #3
gregglesInteresting typos, for sure. Since the email_registration_user_login_validate function doesn't use the $element nor $form arguments it seems that never caused a bug/confusion, but now they should be changed to match the spec.
Regarding 'mail' vs. 'email' I think it might be a feature that this is in 'email' as it is different than core on purpose. Is there a case where this caused some kind of bug or does it just make sense to you?
Comment #4
andypostD8 affected the same
++ on this change
also not sure about this change because it maybe incompatible with some other contrib
Comment #5
andypostNot sure how that works now but
email_registration_user_login_validate()
is element validatorComment #6
gregglesMarking as needs work to remove the change about email vs. mail.
@andypost why do you mark this as major? What's the impact of it?
Comment #7
andypost@greggles I marked major because I can't get how it wotks now because form vs element valudators very different set of arguments
Comment #8
gregglesOK, here's a reroll of just the function signature without the email/mail change. That should go into a new issue/patch for discussion.
Comment #9
gregglesFixing my credit.