[eluser]Pakm@n[/eluser]
[quote author="InsiteFX" date="1338205649"]Try this
Code:
function is_logged_in(){
$is_logged_in = $this->session->userdata('is_logged_in');
//echo $is_logged_in;
if ($is_logged_in !== true){
echo "Necesitas iniciar sesion como usuario para ver este contenido <br />";
echo anchor('login','Login');
/*echo "<pre>";
print_r($this->session->all_userdata());
echo "</pre>";*/
die();
}
}
Note: Cookies can only hold 4KB of data, so be careful not to exceed the capacity. The encryption process in particular produces a longer data string than the original so keep careful track of how much data you are storing.[/quote]
Still not working, as you can see i'm printing the data from the session cookie, and well, it doesn't show a is_logged_in index on the cookie array.
It should be created on the login controller but it doesn't create it.
That's the only data i'm storing on the cookie, so it must be less than 4Kb.
It's driving me crazy hahaha