I am using CakePHP 1.3, and my users are able to store some settings (with the Session component) when navigation around the site without being logged in, and when they hit “save” it ask them to login(using the Auth component) this works like a charm, but at the time they login the session information is lost and their settings is gone.
Why is the session being reset on a login and is there a workaround or option to prevent this?
There are several keys that Cake uses in Session: Auth, Config, Message (maybe some more, I don’t remember). And it’s best not to write in those keys (unless you want to change some values in them). You can see that these keys are capitalized, so a little trick to make sure you are not inadvertently overwrite in those areas is to use a lowercase key.