I am using codeigniter and I have an is_logged_in session setup. User X and User Y log in and no outsider can login to the system. However, User X logs in and can access User Y's dashboard in the same session. How do I make sure User X only access his contents using the session.
private function is_logged_in()
{
$is_logged_in = $this->session->userdata('is_logged_in');
if(!isset($is_logged_in) || $is_logged_in != TRUE){
return FALSE;
}
return TRUE;
}
User X has his own ID. So when you fetch the contents from database or somewhere you make sure you fetch only the contents which belongs to that ID
BTW. You say that you are "allready doing that", but I can't see it anywhere in this code? If you do have it somewhere (I presume it would be the userdata(), please post the code segmen - Bono 2012-04-04 07:05