Welcome Guest, Not a member yet? Register   Sign In
Problem with session on default page
#1

Hi,

I have problem with sessions in CodeIgniter. 
When user log in to system I have this code:

Code:
$data_login = array(
    'id' => $user->id,
    'name' => $user->name,
    'email' => $user->email,
    'logged_in' => true
);
$this->session->set_userdata($data_login);

In general, everything works but when I don't log out and close the page tab, then I will visit the site again [b]$this->session->userdata('logged_in')[/b] returns NULL. When I enter another subpage, everything returns to normal - recognizes the logged in user.

Where is a problem? 
Reply


Messages In This Thread
Problem with session on default page - by mazz - 09-23-2019, 06:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB