1
Developing a login system, I wrote the following script in the controller:
$usuario = $this->input->post('usuario');
$senha = $this->input->post('uenha');
$q = $this->login->logar($usuario, $senha);
if (!$q):
$this->session->set_userdata('logado',false);
redirect('login');
endif;
$this->session->set_userdata('logado',true);
redirect('redacoes');
This is an example.
It turns out that after redirect to another controller, sessions are not being stored.
Note: I clicked on autoload.
Yes, I am! I even made it clear in the question. Any session I declare in controller X and then redirect, or even manually access in controller Y, disappears in a magic touch..
– Cobra