Welcome Guest, Not a member yet? Register   Sign In
Update session data?
#1

[eluser]Kola[/eluser]
hey,

I've been looking at the wiki, and there was no apparent answer (or I've missed it completely).

Assuming you have a session with this data:

Code:
$session_data = array(
'username' => 'some username',
'level'    => 51,
'clever' => TRUE
);
$this->session->set_userdata($session_data);

Can I change a specific parameter without destroying the session first? something like
Code:
$this->session->userdata('level') = 1;

Or do I have to extract the data, then destroy the session, and create an entire new session with the new data?

Best Regards
#2

[eluser]Agustín Villalba[/eluser]
You only have to:
Code:
$this->session->set_userdata('level',1);
#3

[eluser]Kola[/eluser]
Thanks alot.




Theme © iAndrew 2016 - Forum software by © MyBB