CakeDC/users — pull request #81 by chmac (2012-10-17 14:12:07+00:00)
Title: Remember me cookie name / key were swapped

The cookie was called rememberMe and within that cookie, the variable was called User. So the effect was a cookie in the browser called rememberMe[User]. This is the opposite of the code in the readme to be inserted into AppController, where it had cookie name "Users" and key "rememberMe".

I changed the _setCookie() function to set a cookie called Users[rememberMe] which seems like the more sensible path, and matches the readme.

Having made this change, I have another issue. I delete my session cookies, leaving the Users[rememberMe] cookie, and then try to access a restricted method. The `$this->Auth->login($data);` in AppController returns `true`, I am logged in, and I can access controller methods which are not visible to anonymous users. However, `debug($this->Auth->user('id'));` shows `null`.

I'm not familiar enough with cakephp to know what's going on. I do know that after a form based login, `$this->Auth->user('id')` returns the currently logged in user's id. So something appears to be different between a cookie based login and a form login.