[eluser]victorche[/eluser]
Really sorry for this stupid question, but i am totally blocked today...
I have a simple logic, which makes all non logged users (guests) to be redirected to /login
And i can make the check in every single controller, but i prefer it in one place only, in my case MY_Controller.php:
Code:
class MY_Controller extends CI_Controller
{
function __construct()
{
parent::__construct();
if (!$this->auth->logged_in())
{
redirect('/login', 'refresh');
}
}
}
Makes sence, right?
And in login.php I have a simple piece of code:
Code:
class Login extends MY_Controller
{
function __construct()
{
parent::__construct();
}
function index()
{
$this->load->view('login.tpl.php');
}
}
The result is ... continius reloadin of /login
Any ideas, please?