Welcome Guest, Not a member yet? Register   Sign In
Best way to handle passwords using CI library?
#9

[eluser]Elliot Haughin[/eluser]
Case insensitivity is a good idea...

But instead of doing:
Code:
"LOWER(username)` = '".strtolower($attempt->username)."'")

Just do:
Code:
$this->db->where('username', strtolower($username));

Then make your 'insert' convert the username into lowercase before it goes into the db.
That way, you know that all usernames in the DB are lowercase and you dont have to run LOWER() on every select request.


Messages In This Thread
Best way to handle passwords using CI library? - by El Forum - 02-14-2008, 08:01 PM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 12:47 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 12:53 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 05:44 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 06:03 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 06:16 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 06:20 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 06:25 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 06:27 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 06:29 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 06:48 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 07:06 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 07:07 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 07:25 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 07:31 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 07:52 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 08:28 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 08:48 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 11:29 AM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 12:22 PM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 11:17 PM
Best way to handle passwords using CI library? - by El Forum - 02-15-2008, 11:32 PM
Best way to handle passwords using CI library? - by El Forum - 02-16-2008, 01:33 AM
Best way to handle passwords using CI library? - by El Forum - 02-16-2008, 02:15 AM
Best way to handle passwords using CI library? - by El Forum - 02-16-2008, 02:31 AM
Best way to handle passwords using CI library? - by El Forum - 02-16-2008, 02:37 AM
Best way to handle passwords using CI library? - by El Forum - 03-06-2008, 08:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB