Welcome Guest, Not a member yet? Register   Sign In
Session data set by third-party application in CI
#1

[eluser]Unknown[/eluser]
Hi all.

Could you please answer my question? I have some third party application which has no relationships with Codeingniter which is used in another one my application.

Now, at some moment of time I would like to make a redirect from this third party application(which has set some data in $_SESSION and $GLOBAL variables) to some controller in Codeigniter. When redirect happens Codeigniter destroys all the data which were previously set while working with that application.What I do really need is to preserve all existing $_SESSION array values and make CI work properly during redirect. How can I achieve this?

Thanks.
#2

[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums.

CodeIgniter doesn't currently support native PHP sessions (although support may be added in the future), and I believe that this is the root of your problem.

You might want to check out [url="http://ellislab.com/forums/viewthread/93200/"]this thread[/url] to see if it helps you at all.
#3

[eluser]Unknown[/eluser]
Thanks for greetings.Do you have an idea how can I pass those data to controller? Probably packing them somehow or smth like this?
#4

[eluser]TheFuzzy0ne[/eluser]
I don't think that would be a good idea, as that could make for some seriously long URLs and I think it could pose a security hazard.

The only answer is to use an abstraction layer, and I think the one I posted should work for you. Failing that, you could perhaps extend the session class and have the userdata() method also check the cookie for your data (not sure if this will work though)...




Theme © iAndrew 2016 - Forum software by © MyBB