Welcome Guest, Not a member yet? Register   Sign In
Retrieve existing session data upon entry into codeigniter system
#1

[eluser]jdav3579[/eluser]
Hi,
I am migrating a system over to code igniter, but it needs to work with an existing system. In the existing system the user-id is stored in a session. I need to be able to retrieve this variable from with my code igniter system. I would preferably like to be able to re-assign it to a variable set up within code igniters session object, but can live with writing it in classic PHP style.
I think Code igniter clears all the session variables upon initializing the system. I am thinking about trying to do a hook of some kind, but not sure yet....


Any help greatly appreciated.

Regards

John
#2

[eluser]BrianDHall[/eluser]
Actually, you'll be pleased to find that CI does not touch _COOKIE or _SESSION at all. CI's Sessions implementation doesn't touch or even effect PHP's native session system, so you don't have to do anything special to get your existing system working with CI.

The only thing CI clears is _GET.

So yeah, you should find that the only issue with your existing system is you don't get the additional ease of use provided by CI's built-in session implementation. Otherwise you are good to go.




Theme © iAndrew 2016 - Forum software by © MyBB