I can't believe that I'm the only one seeing this problem... but am not seeing anyone else mention it.

I'm running Drupal 4.4.1 on PostgreSQL. I have a user account 'Roderik'... and cannot log in with user name 'roderik'. I.e. the user.name field is compared in a case-sensitive fashion.

Is this normal? Or don't other people have this, because there's some setting on the user table / database that I'm missing?

Right at this moment I'm getting around the problem by replacing
"php name = '%s'", $edit['name']"
by
"LOWER(name) = '%s'", strtoLower($edit['name'])"
in a few places in user.module. But I have no idea if this is an ugly hack which can be solved differently. (And I have to reapply this ugly hack on every upgrade, ofcourse :))

Comments

Dries’s picture

That's correct. PostgreSQL is case-sensitive but MySQL is not. This probably went unnoticed because the vast majority of Drupal users use MySQL and only a minority is using PostgreSQL. We might want to fix that so please file a bug report so we don't forget about it (and add a patch if you are familiar with Drupal development). Thanks Roderik.

roderik’s picture

I will add a patch. It's just that I wanted to see whether I was thinking OK.

And you guys are responsible for checking whether that patch makes sense (on mySQL) }:-)
(I don't exactly feel like a PHP wizard yet)

nereocystis’s picture

I use postgresql, after a short time of using mysql. I think that it is normal to require the correct case, and wouldn't consider complaining if I had noticed this feature.

However, there is something to be said for consistency between the databases.

roderik’s picture

But you don't expect any user questions with that feature?
I bet all your users are Unix zealots ;)

My target audience is people with 'average' computer skills.
(I don't know any BBS / community system that requires the correct case, BTW...)

nereocystis’s picture

I don't have many Unix users among my users. I did get a question regarding login problems which I didn't understand. He had trouble logging in. I wonder whether case was an issue. I thought that it was a problem with having a space in the name.

I still have some trouble convincing people to use the drupal site at all. People are using it, but many aren't bothering to log in.

I'll buy your argument for consistency. My users shouldn't notice a difference, as long as I don't have any user names which match when case is ignored.