Simple Authentication Library for Code Igniter - EasyAuth
December 1st 2008
Here is a very simple authentication library for the framework Code Igniter. It uses a MySQL database table 'users' to authenticate against. You can find some basic documentation on this library here.
Enjoy!
1,724 downloads





























8 COMMENTS
You would want to implement the auth in your controller to limit certain functions. Or you could set it up to auto auth with something like this..
class Blog extends Controller {
function __construct(){
if($this->easyauth->connected == true):
$this->load->view('dashboard');
else:
$this->load->view('login');
endif;
}
}
And be sure to include easy auth in your auto loader configuration.
<html>
<head>
<title>Login Page</title>
</head>
<body>
<form method='post' action='/your-protected-url'>
Username<br />
<input type='text' name='login[username]' value='' /><br /><br />
Password<br />
<input type='password' name='login[password]' value='' /><br /><br />
<input type='submit' value='Login'>
</form>
</body>
</html>
ADD YOUR COMMENT