Cakephp lost session variable when redirect


I was losing session information after a login call too and after searching for a while I found a way to fix my issue.

You just need to put these lines in your AppController.php

public function beforeFilter() {
if (!$this->Auth->loggedIn() && $this->Cookie->read('Johan.remember_me')) {
$cookie = $this->Cookie->read('Johan.remember_me');

If you get some problems, contact me at [email protected]