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')
CommentFileSizeAuthor
#1 username_check_caseinsensitive.patch819 bytesfrankcarey

Comments

frankcarey’s picture

Version: 5.x-1.3 » 6.x-1.3
StatusFileSize
new819 bytes

@scottgifford created patch per your suggestion, but against 6 version (might work for both?)

frankcarey’s picture

Status: Active » Needs review

I tested this locally and it works (ASDFASDF is said to be taken, if asdfasdf is taken.

scottgifford’s picture

That patch looks right to me.

ardas’s picture

Version: 6.x-1.3 » 6.x-1.5
Status: Needs review » Reviewed & tested by the community

Fixed in 6.x-1.5

scottgifford’s picture

A backport to 5.x would be appreciated, we're still on that platform.

Thanks!