[eluser]andriu[/eluser]
Hi
I'm still a bit new to CI an OOP.
At the moment to check if a user is logged in I check in every function
ex.:
Code:
function index()
{
if (!$this->erkanaauth->try_session_login())
{
redirect('admin/login');
}else {
$this->load->view('admin/page');
}
}
There must be a more efficient way to do this so I don't have to repeat the same code.
Thanks for any help.