If I do a print_r($_SESSION) in my page.ctp I get:
Array
(
[Config] => Array
(
[userAgent] => b3346028c15f82ac5d4b25c4f50d8718
[time] => 1281034201
[timeout] => 100
)
[manualLogout] => 1
[Message] => Array
(
)
[Auth] => Array
(
[redirect] => /events/add/controller:events
)
[facebookSynced] => 1
)
The var facebookSynced I set in my controller with $this->Session-write() - and there it is in the session as expected. But when I do a pr($this->Session) or a pr($session) from page.ctp I get:
SessionHelper Object
(
[helpers] => Array
(
)
[__active] => 1
[valid] =>
[error] =>
[_userAgent] => b3346028c15f82ac5d4b25c4f50d8718
[path] => /
[lastError] =>
[security] => medium
[time] => 1281016202
[sessionTime] => 1281034202
[watchKeys] => Array
(
)
[id] =>
[host] =>
[timeout] =>
[base] => /Eclipse/Calc_1.3.2/trunk
[webroot] => /Eclipse/Calc_1.3.2/trunk/
[here] => /Eclipse/Calc_1.3.2/trunk/users/login
[params] => Array
(
[controller] => users
[action] => login
[named] => Array
(
)
[pass] => Array
(
)
[plugin] =>
[form] => Array
(
)
[url] => Array
(
[url] => users/login
)
[models] => Array
(
[0] => User
)
)
[action] => login
[data] =>
[theme] =>
[plugin] =>
)
How do I access my session with the facebookSynced var in it, and what is the difference between these two 'sessions'. Extra info: in core.php I have:
Configure::write('Session.save', 'php');
Configure::write('Session.cookie', 'CAKEPHP');
Configure::write('Session.save', 'custom_sesh');
Configure::write('Session.timeout', '180');
Configure::write('Session.checkAgent', true);
Configure::write('Session.start', true);
The contents of custom_sesh is just one line:
ini_set('session.cookie_lifetime', 0);