- Go to Administer -> user management -> users
- click edit on any user
- edit the user's email field. update it to some email that IS KNOWN to be already taken on the system by some other user
- click submit
Drupal omits the following message: "The e-mail address is already registered. Have you forgotten your password?".
This is the same message a new user gets when he tries to register with an email already used. In our case, the message should have been something like "Email address already used. You must not use a used email address" (or the like).
As for resolution, I'm contemplating about the desired remedy. There are two options I can think of:
1. the code (user.module, line 1383) should check in what context it is being called - new user registers? somebody adds manually a new user? someone is editing an existing user? etc. Omit output accordingly
2. Create different submit/validate functions for the forms of editing existing users and adding manually a user
I'll be happy to assist with patch creation but this needs further solidification before translated into code.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 195976-user_validate_d6-11.patch | 1.42 KB | sandipmkhairnar |
Comments
Comment #1
mcarbone commentedI have verified this on HEAD, Drupal 6, and Drupal 5. This is especially a problem because the "Have you forgotten your password?" link leads to an "Access denied" page when logged in. Thus, this message appears erroneously whenever a user is logged in and tries to modify a user's email address. This can happen on /admin/user/user/create or simply on /user/[uid]/edit, if users are able to modify their email address.
The solution, I think, is simply to modify the error message if the user is logged in. I have attached a patch that does this, and will backport for 6 and 5 if it makes it to HEAD.
Comment #3
mcarbone commentedOops, re-rolled from Drupal root.
Comment #4
catchNice change.
Comment #5
dries commentedLet's add a simple code comment. Thanks!
Comment #6
mcarbone commentedAdded comment, and clarified comment above as well.
Comment #7
dries commentedCommitted to CVS HEAD. Thanks!
Comment #8
mcarbone commentedBackported for Drupal 6.
Comment #9
hefox commentedConfirming bug in 6, patch applies and looks to work.
Comment #10
thedavidmeister commentedPatch no longer applies.
This bug still exists in D6, but not in D7+
Adding tags.
Comment #11
sandipmkhairnar commentedRe-rolled Patch.
Comment #12
sandipmkhairnar commentedComment #14
Alumei commented11: 195976-user_validate_d6-11.patch queued for re-testing.
Comment #15
jacob.embree commented#11 works.