[eluser]Unknown[/eluser]
Did you know, that it's not possible to access fields of arrays inline, when getting them as result of a function?
And did you know, that its exactly IMPOSSIBLE to store any model type object in CI_Session?
Now since you force me to store my object data in the o-so-convenient-no-functions-supporting arrays, at least your oh-so-smart get-session-data function doesn't do the trick.
Here, I fixed you session->userdata function:
Code:
function userdata($item, $subitem = "") {
if($subitem == "") {
return ( ! isset($this->userdata[$item])) ? FALSE : $this->userdata[$item];
} else {
return ( ! isset($this->userdata[$item][$subitem])) ? FALSE : $this->userdata[$item][$subitem];
}
}
Now, at least arrays become usable there. You're welcome.