Posted by Zen on April 11, 2007 at 8:56am
6 followers
| Project: | Drupal core |
| Version: | 6.x-dev |
| Component: | user.module |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Zen |
| Status: | closed (fixed) |
Issue Summary
Attached patch:
- Removes a now unnecessary #weight attribute.
- Checks for e-mail address validity before performing a costly user_load.
- Trims user input.
- Removes a notice
$account->uidwhen $account is not an object [no account found]. - email should be e-mail.
-K
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| pass-reset-form.patch | 1.72 KB | Ignored: Check issue status. | None | None |
Comments
#1
Works for me! Tested and committed.
#2
Hi,
I just noticed that my earlier patch does not address usernames using an e-mail address format. The attached patch fixes that.
Thanks,
-K
#3
Patch still applies cleanly.
#4
But no longer :(
# patch -p0 < password-reset-correction.patch
(Stripping trailing CRs from patch.)
patching file modules/user/user.module
Hunk #1 FAILED at 1169.
1 out of 1 hunk FAILED -- saving rejects to file modules/user/user.module.rej
#5
reroll
test:
1. admin/user/user/create - create user with name: name@name.com email: mail@mail.com
2. logout
3. user/password - enter name@name.com
#6
I might be better to roll back to the original version then? It's slightly more easier to read, IMO.
#7
Dries, I assume you mean the original version of the patch. It is not exactly right, as it identifies "Dries@drupal.org" kind of usernames (as supported by drupal.module in previous Drupal versions, possible to install alongside Drupal 6 as a contrib) as an email address and will fail to load the user, not going to try this as a username too.
#8
Just to confirm I tested this on a clean install, and it works fine with name@name usernames. So I'm marking to RTBC.
#9
I looked at the patches, and reread Dries' concern. Indeed, we should not call something a cleanup, when it solves the same problem with over-commented, hard to follow code, when it does not solve any performance problems at the same time. The password request page is so seldom used, that I rolled back to the more cleaner version (but still added two lines of comments there to make it clear).
Committed the attached patch.
#10
Automatically closed -- issue fixed for two weeks with no activity.