Make Username Case Sensitive

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

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

Hi Greg,

Thanks for the reply, yeah sorry I know its a bit of an odd question to ask but the client would like it to be set up this way if possible.

If it is reasonably straight forward for you to do so, could you possibly tell me what I need to edit.

I'm reasonably comfortable editing the files as we have made a few edits already for report purposes.

Many thanks!

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