Problem/Motivation
I had 2 situations that triggered this.
- I was wanting to sanitize the mail field so was running it through strtolower in the hook_uif_pre_create() hook.
- Shitty data meant users appeared more than once and the case mix of the mail field differed
Proposed resolution
Making the mail lookup case insensitive fixes this.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | uif-mail_lookup_case_insensitive-1718264-1.patch | 781 bytes | gold |
Comments
Comment #1
gold...and the patch.
Comment #2
dwightaspinwall commentedGood catch. Seems to depend on the default character set and collation of your server, as I am not able to reproduce it on my server. Per http://dev.mysql.com/doc/refman/5.5/en/case-sensitivity.html :
But definitely a bug, and your patch goes part of the way, but there are two other places in the code where this comparison is done and they all need to be changed. I've done that against 7.x-1.x-dev using db_like() and the LIKE comparison in the same way implemented in the user module. Dev snapshot will be available tomorrow.
Comment #3
dwightaspinwall commented