as can be seen in the form definition of user_register, $form['account'] is unset and form items moved to into the main part of the form, so in the form_alter of this module ends up adding a misleading $form['account'] (which confuses other modules that check if form['account'] is set)
| Comment | File | Size | Author |
|---|---|---|---|
| account_form.patch | 1.03 KB | hefox |
Comments
Comment #1
jaypanYou can use hook_form_alter() to adjust it however you would like. That's the advantage of hook_form_alter().
Comment #2
hefox commentedI am using hook_form_alter and weights to get around this bug, but this is a bug, and causing conflicts with contrib modules, which will be a problems for those that don't know what is happening or how to fix it.
Please, take a look at user_register, http://api.drupal.org/api/function/user_register/6, particularly
If the user_register form doesn't have an $extras returned, user_register form definations moves everything into main $form, getting rid of $form['account']. So when your form_alter adds in weights to $form['account'] despite it not existing, it creates this weight $form['account'] that basically looks like
This causes problems when other modules that are correctly testing where $form['account'] exists, they see the false $form['account'] and end up changing that instead of the real values in the form, making those modules not work in some case (ie like email_registration module).
Comment #3
dave reidExactly what hefox explains.
Comment #4
jaypanI'll look at this a little closer. At a quick glance at his explanation, it makes sense.
Comment #5
jaypanHefox - I've included this code in version 3.1. Thank you - it was a nice clean fix. I apologize for not looking at it a little closer when you first submitted it.