I need an assistance updating the session of my website. After running:
echo "<pre>";
print_r($this->session->all_userdata());
echo "</pre>";
It give me this result:
Array
([__ci_last_regenerate] => 1537865901
[logged_in] => 1
[user] => stdClass Object
([id] => 19755
[student_id] => test12345
[email] => [email protected]
[status] => 1
[date_created] => 2018-09-20
)
Basically what I need is to update the 'status' which is under the array 'user'. I tried:
$this->session->set_userdata('status', 0);
$this->session->set_userdata(user('status'), 0);
Any suggestion? Im using the latest codeigniter. Thanks