If a user use capital letters in your user name for the login, drupal return a message "name user or password unrecognized".
Drupal when searching the username will lowercase.
For example, if you register with the name "uSer" try to find "user".
If you change your own user names in the table of users, the problem is solved temporarily :/
Comments
Comment #1
ahmed.othman commentedThe Username is not case sensitive so if i registered with username AHMED it should be the same if i registered with username ahmed, also i have the right to login with either ahmed or AHMED.
Comment #2
Salsero72 commentedI encounter the same problem---
It's been encountered since version 4.
I am running 5.10.
Username IS case sensitive.
Last problem this morning
A person signed up with "Claudio". user already exists in the database,
but the scripts did not recognized the presense of another user with that username.
(somewhat way, the system reduced to lowercase)
So the user got the "new user pending registration mail" But no user was actually created
/**************************************************/
ERRATA CORRIGE
/**************************************************/
I found that the problem is generated by MYSQL. Not by php code.
The problem is from the function LOWER()
if you login to mysql console and perform
mysql> select lower('Test');
+---------------+
| lower('Test') |
+---------------+
| test |
+---------------+
BUT if you perform
mysql> SELECT uid FROM users WHERE uid != 0 AND LOWER(name) = LOWER('ExampleUser');
you get nothing BECAUSE
LOWER('ExampleUser') => gives 'exampleuser'
LOWER('ExampleUSER') => gives 'ExampleUSER'
The worst thing is that If you have THE SAME username..
like uid=100 namae = 'ExampleUser' (existing in the db)
and perform
mysql> SELECT uid FROM users WHERE uid != 0 AND LOWER(name) = LOWER('ExampleUser');
it gives NOTHING because the lowwered string returns 'exampleuser' but the lowered FIELD return 'ExampleUser' (ignoring the LOWER function)
Wasn't mysql case insensitive?
I applied the following patch at line 1389 user.module (function "_user_edit_validate")
AND also on email validation
Because at the moment I cannot not get the mysql issue ..
/**************************************************/
ERRATA CORRIGE 2
/**************************************************/
My patch does not work..@#@ WITHIN DRUPAL users table, the select is case sensitive
outside, it is not.
Select 'a'='A' > 1
Select uid from users where name = 'exampleuser' (table contains "ExamplUser") > 0 results
Comment #3
Art Morgan commentedWe just upgraded to 5.12, and we have the same problem. I think this is a bug that's been around for a long time. Every time we upgrade we have the problem. From what I've heard, it doesn't affect new installs or sites that started from 5.x onward, so somehow nobody has checked in a fix.
we may have a solution in the systems.inc file. i will update if i can find it.
Comment #4
keith.smith commentedComment #5
dpearcefl commentedConsidering the time elapsed between now and the last comment plus the fact that D5 is no longer supported, I am closing this ticket.