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

frankcarey - July 16, 2009 - 18:10
Version:5.x-1.3» 6.x-1.3

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

AttachmentSize
username_check_caseinsensitive.patch 819 bytes

#2

frankcarey - July 16, 2009 - 18:12
Status:active» needs review

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

#3

scottgifford - July 16, 2009 - 20:24

That patch looks right to me.

#4

ardas - September 24, 2009 - 13:23
Version:6.x-1.3» 6.x-1.5
Status:needs review» reviewed & tested by the community

Fixed in 6.x-1.5

#5

scottgifford - September 30, 2009 - 06:40

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

Thanks!

 
 

Drupal is a registered trademark of Dries Buytaert.