• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
db session session_data into an array

#1
[eluser]Unknown[/eluser]
Hi guys,

I am currently using the DB session extension of CI to deal with user sessions and authorisation. I have hit a bit of a problem though. Ideally I would like to query the database table and put all the items in the session_data field into an array, but because of the way that the data is stored I cannot see an easy way to do this. Has anyone had to deal with this problem and managed to find a way to do it? I'd be most grateful if you could share any ideas. Many thanks,

L

#2
[eluser]CI TaMeR[/eluser]
I just switched from DB_Session to OB_Session

Following works with DB Session however I can't get it to work with OB Session.

Code:
print_r($this->session->userdata());
which is the same thing as
Code:
$i = $this->session->userdata();
print_r($i);

So yes I would like to know also how to get this to work with OB Session, don't wont to switch back if I don't have to.

Thanks

#3
[eluser]CI TaMeR[/eluser]
Got it for OB Session you do following:

Code:
$i = $this->session->userdata;
NOT
Code:
$i = $this->session->userdata();


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.