Make Username Case Sensitive

5 posts by 3 authors in: Forums > CMS Builder
Last Post: February 1, 2013   (RSS)

By dm - January 31, 2013

hi

can anyone let me know if there is there a way to make the username field case sensitive?

many thanks for you help!

e

By gregThomas - February 1, 2013

Hi,

There isn't an easy way to make the username field case sensitive without editing some of the core CMS Builder files. We don't recommend doing this as the change would be removed if you upgraded CMS Builder at a later date, and we wouldn't be able to provide support for the changes.

Out of interest, why would you like the username field to be case sensitive?

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By dm - February 1, 2013

I have actually just this minute found a different solution to the problem we had so case sensitivity isn't quite so vital now but that could change so if it is just a few changes I would still be interested in knowing how to implement this for future reference..

Many thanks for your time!

By Chris - February 1, 2013

Hi dm,

As Greg mentioned, this is not recommended, and has not been tested, but if you really want to, you can change line 21 of login_functions.php from

    $userFound    = mysql_get(accountsTable(), null, array('username' => $username));

to:

    $userFound    = mysql_get(accountsTable(), null, mysql_escapef("BINARY `username` = ?", $username));

All the best,
Chris