Closed (fixed)
Project:
Invite
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jan 2010 at 22:03 UTC
Updated:
20 Aug 2010 at 00:30 UTC
Jump to comment: Most recent file
If there already exists a user with the mail address email@example.com and you want to invite this user by using EMAIL@example.com than mysql gives the correct result (because the default string comparison in mysql is not case sensitive, I don't think that even this will work in postgresql). But anyway, array_diff seems to be case sensitive so this will not work and the invalid emails will remain in $emails.:
// Keep only valid e-mails.
$emails = array_diff($emails, $failed_emails);
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | invite-689732-2.patch | 799 bytes | osopolar |
Comments
Comment #1
osopolarThe fix is to lowercase all email addresses in $email and $failed_emails. I guess this way we only save lower case email addresses in the invite table.
Drupal does noch change the case while saving the users mail address but it checks the case in sql-querys like:
SELECT COUNT(*) FROM {users} WHERE uid != %d AND LOWER(mail) = LOWER('%s')Comment #2
smk-ka commentedThanks, this has already been fixed in the development snapshot.
Comment #3
YK85 commentedHi,
Sorry this might be a very rookie question, but how can we tell if this patch went into the latest 6.x-2.0-beta1 or if it's only in the 6.x-2.x-dev? I see the version as HEAD and not sure what that means.
Thanks so much!
Comment #4
smk-ka commentedSorry, Yaz, I missed your question: it's listed in the changelog for beta1:
Comment #5
YK85 commentedi see it now, thanks!