Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
user.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
23 May 2007 at 15:41 UTC
Updated:
8 Jun 2007 at 13:20 UTC
Jump to comment: Most recent file
As per title - this essentially makes it impossible to properly validate a new user programmatically (i.e. by calling drupal_execute('user_register')). Simple one-line patch to fix.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | user_validate_0.patch | 2.99 KB | hunmonk |
| #2 | user_validate.patch | 2.92 KB | hunmonk |
| user-edit-validate.patch | 769 bytes | walkah |
Comments
Comment #1
drewish commentedseems likea logical change but that the
|| !$user->uidbit is rather cryptic. i'd suggest a comment at the least or perhaps a different "wording".Comment #2
hunmonk commentedmakes sense to me. while i was digging around in there, it struck me that we should be trimming $edit['name'] and $edit['mail'] as well -- otherwise i think you could get a situation where both 'sam' and 'sam ' could register.
attached patch corrects.
Comment #3
hunmonk commented...with drewish's comment suggestion.
Comment #4
moshe weitzman commentedi tested this, and did a code review. RTBC. is a simple fix, the diff ismore than a few lines only cuz of indentation changes.
Comment #5
dries commentedI don't think the trimming is necessary. It should be catched by the validate functions:
For the username:
For the e-mail address there is no such equivalent. Looks like we want to clean this up a little bit more. Maybe the trim() should not have been added to this patch. They are fairly unrelated, and complicate the patch's original intend.
Comment #6
walkah commentedAs I mentioned to Chad in IRC - the trim()'s certainly aren't part of this patch - while I think they're probably useful for validation, they're not actually addressing what this patch is about. I'd vote for committing the original patch and create a new issue to address name/mail validation (trimming , etc).
Comment #7
moshe weitzman commentedRTBC for the original patch.
Comment #8
dries commentedCommitted to CVS HEAD.
Comment #9
(not verified) commented