[eluser]Evil Wizard[/eluser]
May I assume that when the user logs in a value is set somewhere to prevent the user being faced with the login screen at every page lol. What I do is set the session value on successful login
Code:
if(successful_login($user, $pass)) {
$this->session->set_userdata('logged_in', 'true');
}
then a quick check every time you need to be sure of the login
Code:
if($this->session->userdata('logged_in') === 'true') {
// user is logged in do stuff
} else {
// not logged in, redirect somewhere
}
Just remember to unset/destroy the session variable when the user logs out.