I am using codeigniter session library, and that's how it works:
function _example_output($output = null)
{
if($this->session->userdata('logged_in'))
{
$session_data = $this->session->userdata('logged_in');
$output->ses_data = array('username' => $session_data['username'],
'id' => $session_data['userid'],
'permisos' => $session_data['userperms']);
$this->load->view('home_view.php',$output);
}
else
{
//If no session, redirect to login page
redirect('login/index/', 'refresh');
}
}
It works fine, when I try to access from another browser without being logged in, the problem is when I refer to Ajax_list, for example if I write
[b]mysite.com/panel/users/[/b]
Not allow me access because it is a private area, so far so good.
but ....
[b]mysite.com/panel/users/[color=#ff0000]ajax_list[/color][/b]
This shows the list! and I'm not logged in, any suggestions for handling sessions in this case?
Greetings!