This change may be useful when user is registered from other forms instead of the default register form. For example the Registration Types module provides this possibility.
This change may be useful when user is registered from other forms instead of the default register form. For example the Registration Types module provides this possibility.
Comments
Comment #2
StefanPr commentedComment #3
StefanPr commentedComment #4
benjy commented+1 for this.
This could probably have been done by simply checking the form_id, also a little safer in case someone is extending/using the AccountForm for anything else.
Comment #5
andypostPlease update summary why that change could be useful
Registration form defined in user entity annotation so could be overriden but I do not like non-specific
hook_form_alter()cos it will fire for every form on sitewill be affected by #2864902: Update "e-mail" to "email" across all files
Comment #6
qichanghai commentedHere is a patch which implements hook_user_form_alter() instead of hook_form_alter().
Comment #7
qichanghai commentedComment #9
qichanghai commentedNew patch since the previous one failed to apply.
Comment #10
qichanghai commentedComment #11
qichanghai commentedComment #12
andypostIt looks great except I'm not sure that Registration Types module & other custom implementations will not inherit their forms from the core's class
Comment #13
mistrae commentedThe patch remove the
email_registration_form_user_register_form_alterfunction and addemail_registration_form_user_form_alterfunction, but the user form alter already exist line 181. It creates an errorComment #14
andypostneeds work for #13
Comment #15
m.abdulqader commentedOnly changing the form ID to Form Base will make this module work with form mode manager.
Comment #16
m.abdulqader commentedChange hook to BASE_FORM to support form mode manager module.
Comment #17
andypostComment #19
gregglesThis is a straight reroll of #16 since DrupalCI seems to be mad about something in that one.
Comment #21
gregglesOK, let's try this again :) Still just a reroll of #16 to remove fuzz of one line.
Comment #23
gregglesOK - now fixed. Thanks!
Comment #25
gregglesThis issue seems to have caused a regression - see #3024558: Username regenerated improperly after rc6 release.