[eluser]dhaulagiri[/eluser]
when creating new controller with this auth, what should i include for checking login ? What should i load in constructor ?
Is this enough ?
Code:
function __Construct()
{
parent::Controller();
$this->load->library(ion_auth);
//what to include for check login
//is there anything else i should add in constructor fpr best practise ?
}
OK i did this and it seems to be working, can i implement this in live site ? I really like this auth.
Code:
function __Construct()
{
parent::Controller();
$this->load->library(ion_auth);
if(!this->ion_auth->logged_in()) redirect('auth/login');
//is there anything else i should add in constructor fpr best practise ?
}