how to get $_SESSION value in cakephp
cakephp, php, session
Solution
Didn't test, but try this.
In your corephp app:
$_SESSION['Auth']['User'] = $someone;
My reasoning is that it will set the $_SESSION, but maybe CakePHP doesn't recognize it for some reason. So we set it the right way using Cake's API:
In CakePHP
$this->Session->write('Auth.User', $_SESSION['Auth']['User']);
Problem
I am setting up a user session from a core php app that is located in example.com/corephp/, now I want to redirect this user to example.com (the main site) which is in cakephp. How can I retain the user session from the core php app to cakephp app? I triend setting `$_SESSION['user'] = someone` and `$_SESSION['token'] = token` from core php app and tried to retrieve that value from cakephp but it didn't work. I tried to google for this but no proper answer that could work. Thanks in advance. ---------------------- edit I have tried adding session_name('CAKEPHP'); to the core php app. As well as tried to reduce the security level of my cake app from medium to low.