Gossamer Forum
Home : Products : Others : Gossamer Community :

Problem with Capitalisation of Usernames

Quote Reply
Problem with Capitalisation of Usernames
Just noticed this. Got an e-mail from a User (username Kevin) who could not log in. So I checked, and it turns out there is a "kevin" (who signed up first) and a "Kevin"- him, who could not get it.

So, it seems to me, that the check to see if a name is already in use in User.pm should check, well, all lower case maybe (but still allow users to capitalize their usernames in any way they want, and save them that way.)

Here is the existing code:

sub cuser_un_istaken {

# -------------------------------------------------------------------

my $username = shift;

return $DB->table('comm_users')->count( { comm_username => $username }) ? 1 : 0;

}

I was thinking something like:

sub cuser_un_istaken {

# -------------------------------------------------------------------

my $username = shift;

$username = lc($username);

return $DB->table('comm_users')->count( { comm_username => $username }) ? 1 : 0;

}

But that does not address making comm_username also lower case.

Any suggestions?

dave

Big Cartoon DataBase
Big Comic Book DataBase
Subject Author Views Date
Thread Problem with Capitalisation of Usernames carfac 3240 Oct 29, 2003, 8:34 AM
Thread Re: [carfac] Problem with Capitalisation of Usernames
carfac 3142 Oct 31, 2003, 9:22 AM
Thread Re: [carfac] Problem with Capitalisation of Usernames
el noe 3131 Nov 2, 2003, 11:51 AM
Post Re: [el noe] Problem with Capitalisation of Usernames
carfac 3133 Nov 2, 2003, 3:05 PM