Username check should be case-insensitive
scottgifford - April 8, 2009 - 03:40
| Project: | Username originality AJAX check |
| Version: | 6.x-1.5 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Description
Drupal generally treats the username in a case-insensitive manner, and this module probably should to. It should just be a matter of applying the SQL function "lower" to both the database field and the argument, like this:
SELECT COUNT(*) FROM {users} u WHERE lower(u.name) = lower('%s')
#1
@scottgifford created patch per your suggestion, but against 6 version (might work for both?)
#2
I tested this locally and it works (ASDFASDF is said to be taken, if asdfasdf is taken.
#3
That patch looks right to me.
#4
Fixed in 6.x-1.5
#5
A backport to 5.x would be appreciated, we're still on that platform.
Thanks!