My CI sessions are stored in my database.
I have a native PHP script outside of CodeIgniter that needs some information that’s in userdata. Is there a way for my to query the CI session table and figure out what the current user’s session is? I think CI checks the user IP and the “first 120 characters of the browser data string.” Those 2 pieced of data are available to that outside script, right? Can I query for those 2 fields and get an accurate result? Or is CI somehow aware of what the session_id is?
Alternatively, I thought I could could set a native session variable from CI containing the information I needed and try to access it in the outside PHP script. It didn’t work.
I’m open to suggestions.
I used this code to integrate comet chat(an external app) with my CI user system: you might need to modify it but you can get the gyst:
at the end $decoded_ci_session should contain all the userdata normally in
$this->session->userdata()