Posted by yched on August 15, 2009 at 12:41am
7 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | user system |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
| Issue tags: | Fields in Core, Novice |
Issue Summary
user_profile_form_validate() is not called when submitting user/1/edit (user_profile_form).
Only user_validate_picture() is run.
This notably skips Field API validation.
Comments
#1
Oh yes please. Let's fix this because I keep mistakenly thinking that fields aren't working when it's just users.
Based on yched's description, this sounds like a one-liner, so tentatively marking as a Novice patch.
#2
Ok, I don't have time to roll a patch, but the change should be simple:
in user_edit_form, we add "$form['#validate'][] = 'user_validate_picture';". Because there is now a #validate function defined, the default $form_id_validate is not used anymore and needs to be added manually.
To fix this, just add "$form['#validate'][] = 'user_profile_form_validate';" in user_profile_form(). Also, a test would be great...
#3
Here's a first stab at a patch. This patch doesn't include a test because I wasn't sure what the test needs to do.
#4
#5
The last submitted patch failed testing.
#7
Please ignore the previous patch. Here's a new version that still needs a test.
#8
The last submitted patch failed testing.
#9
Oh, testing bot...
#10
The last submitted patch failed testing.
#11
Duplicate of #239676: SA-CORE-2009-001: Missing validation for hook_user
#12
hi
i want to add terms of use and validations to registration form. its urgent can i one help me.
regards udit saroch
#13
Please don't reopen issues fixed and closed 1 year ago for a semi related feature request on a different core version. This is issue hijacking and confuses the hell out of everyone. This is not how the issue queue works. Please open a new issue instead.
+ assigning an issue to yourself means that you intend to work on resolving it yourself.