Welcome Guest, Not a member yet? Register   Sign In
Sessions: I get an empty "user_data" key, what is this?
#1

[eluser]ivanhalen[/eluser]
Hello, this is my first technical post: as a perfect newbie in CI, I'm sure I'll do a lot in the next months Smile
I'm playing with sessions: everything is fine, but looping session data in the view I get an empty "user_data", like this
Code:
session_id: 418dda183a86ecdc346c393882835a36
ip_address: 127.0.0.1
user_agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11
last_activity: 1342889023
user_data:
Is this fine?
Even if I pass some userdata with the suggested docs code as example:
Code:
$newdata = array(
                   'username'  => 'johndoe',
                   'email'     => '[email protected]',
                   'logged_in' => TRUE
               );

$this->session->set_userdata($newdata);
the "user_data" key is always empty:
Code:
session_id: 89d2ef778f169183e3280cd554645346
ip_address: 127.0.0.1
user_agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11
last_activity: 1342889775
user_data:
username: johndoe
email: [email protected]
logged_in: 1
Am I missing something? What the "user_data" key should contain?
Thank you!
#2

[eluser]InsiteFX[/eluser]
It's not missing it was added for future use so right now it will always be empty.
#3

[eluser]ivanhalen[/eluser]
Thanks very much, that makes sense! I wish the docs could be always up-do-date, so I'd avoid these dumb questions...
#4

[eluser]InsiteFX[/eluser]
No questions are dumb.




Theme © iAndrew 2016 - Forum software by © MyBB