Welcome Guest, Not a member yet? Register   Sign In
Username and password authentication script
#2

[eluser]Phil Sturgeon[/eluser]
The main problem here is that you are not loading the database library in check_login_data(). You should load database in /config/autoload.php to save having to load it in each model method.

A few other small things...

get_users($username)
This name is confusing. Suggests it will return multiple but only returns 1.

get_last_ten_entries()
Function doesnt limit to 10 at all, will return all users.

check_login_data($username, $password)
Return the user id and check its over 0 in your controller or something similar, but there is no need to return the pass. Also, you are not actually checking the password, should probably uncomment that ^_^


Messages In This Thread
Username and password authentication script - by El Forum - 09-29-2008, 02:12 AM
Username and password authentication script - by El Forum - 09-30-2008, 07:04 AM
Username and password authentication script - by El Forum - 09-30-2008, 09:09 PM
Username and password authentication script - by El Forum - 09-30-2008, 10:37 PM
Username and password authentication script - by El Forum - 10-01-2008, 01:38 PM
Username and password authentication script - by El Forum - 10-03-2008, 10:31 PM
Username and password authentication script - by El Forum - 10-11-2008, 02:05 PM
Username and password authentication script - by El Forum - 01-18-2009, 08:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB