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 user edit page type doesn't validate the form. So users would be able to enter non valid email addresses and so on.
This is, because pageroute does programmatically submit the user_edit form, but there is a bug in there, so that the form won't be validated correctly!
Issue: http://drupal.org/node/109588
So apply the latest patch from the linked issue or don't use this page type!
Comment | File | Size | Author |
---|---|---|---|
#4 | user_module.txt | 115.27 KB | Taxoman |
Comments
Comment #1
iaminawe CreditAttribution: iaminawe commentedHi,
When I use the User Edit page type in my pageroute it acts as if I am entering a new user and not updating an existing one. It gives me the validation error that "the username and e-mail already exist" when I submit the form to update. I wanted to ask firstly if this is what is meant by the "validation error" above and then I posted this question at the link above but have received no answer.
Can anyone help steer me in the right direction as to how and where to apply the patch given at the link above.
This is one of the final outstanding elements on a site that is otherwise complete and I would really appreciate any assistance anyone can give on this.
Thanks in Advance
Gregg
Comment #2
christefano CreditAttribution: christefano commentedHi Gregg. The patch at #109588 does fix the validation error you're asking about. It looks like you already found a patching screencast but take a look at http://drupal.org/patch/apply as well.
Comment #3
iaminawe CreditAttribution: iaminawe commentedThanks Christefano
When I finally learnt how to patch, the patch worked a charm and the validation error went away.
Thanks for your help
Gregg
Comment #4
Taxoman CreditAttribution: Taxoman commentedWhen I try a version of user.module with the above patch applied (drupal 5.7), I get several errors:
On a CCK type as the first step of a page route, I get these messages:
1. warning: Missing argument 1 for drupal_retrieve_form() in [pathfromroot]/includes/form.inc on line 179.
2. warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '' was given in [pathfromroot]/includes/form.inc on line 218.
3. warning: uasort() [function.uasort]: The argument should be an array in [pathfromroot]/includes/common.inc on line 2140.
On entering the user/uid/edit page, I get this error message, and the user name field is not shown, neither is there an email address in the email address field:
- warning: Missing argument 2 for user_edit_form(), called in [pathfromroot]/modules/user/user.module on line 477 and defined in [pathfromroot]/modules/user/user.module on line 1307.
I attach a copy of the new user.module where the patch is applied, in case someone can spot something wrong (would like a confirmation if this the correct contents with the above patch)
Comment #5
Tauran CreditAttribution: Tauran commentedComment #6
Tauran CreditAttribution: Tauran commentedIssue persists.
Apply the patch from the issue linked in the description.
Comment #7
momeee_2 CreditAttribution: momeee_2 commentedCan anyone help me, when i want to register my self to my site it says the email address is already registered i tried dozen of the new email address but still it gives me the same massage