Welcome Guest, Not a member yet? Register   Sign In
user_data from session database
#1

[eluser]Unknown[/eluser]
I am trying to retrieve custom session data from the session database as specified in the guide but it doesn't say how to extract it. All I have done is create the database per the example in the session class section and populated the sample data:

Code:
$newdata = array(
                   'username'  => 'johndoe',
                   'email'     => '[email protected]',
                   'logged_in' => TRUE
               );

$this->session->set_userdata($newdata);

I should be able to extract it like this:

Code:
$session_id = $this->session->userdata('session_id');

But how do I select [userdata][username] or whatever?




Theme © iAndrew 2016 - Forum software by © MyBB