Re: [Mapbender-users] Re: Mapbender Login Groß-/Kleinschreibung case insensitive
Thomas Baschetti
Thomas.Baschetti at gmx.de
Wed Jul 11 04:09:40 EDT 2007
Hi,
>
> You might want to have a look a the function auth_user within login.php:
>
> search for this rows:
>
> $sql = "SELECT * FROM mb_user WHERE mb_user_name = $1 AND
> mb_user_password = $2";
> $v = array($name,md5($pw));
> $t = array('s','s');
>
>
> Try this:
>
> $sql = "SELECT * FROM mb_user WHERE lower(mb_user_name) = $1 AND
> mb_user_password = $2";
> $v = array( strtolower($name), md5($pw));
> $t = array('s','s');
>
> Changes made: lower(mb_user_name) within the sql and strtolower($name)
> for the compare value.
>
> untesteted, but thius should do the trick, at least for your specific
> requirement.
just a small addition:
Ensure you don't have users with names like "Username" and "username" at the same time when using this approach.
Ciao
Thomas
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
More information about the Mapbender_users
mailing list