[eluser]ryan656[/eluser]
Is there any reason why it would be "bad" to mix sessions? I am storing a bunch of arrays inside session vars and codeigniter doesn't let you access them the same way that native sessions do, for example:
Code:
//Array
$array = array('key' => 'val', 'key2' => 'val2', 'key3' => 'val3');
//Native
$_SESSION['ar'] = $array;
//CI
$this->session->set_userdata('ar', $array);
//Now to access the native values I can do this
$val2 = $_SESSION['ar']['key2'];
//But in CI I have to do this
$ci_array = $this->session->userdata('ar');
$val2 = $ci_array['key2'];
I know it doesn't seem like a huge deal but it annoys the shit out of me that I can't access the values with one line using CI sessions. I am set on using native sessions but the user system and a few other components of the application are already using CI sessions and I don't feel like converting them for this one project.
So again, is there any reason (security, performance, etc.) that this is a bad idea? Or maybe (just thought of this right now) there is third-party session library for CI that allows this?
Thanks,
Ryan