title: CakePHP not saving my cookie
body: <p>In my users controller I am trying to put in place the remember me functionality on login. IT seems pretty simple set a cookie look for the cookie when the user visits the login page and if it exists log them in. However, Cake is not saving the cookie, at least not that I can see, and when I revisit the page I am not auto logged in.</p>
  
  <p>To test this I have the following code:</p>
  
  <pre><code>$cookie=$this-&gt;read('Auth.User');
  if(empty($cookie) and !empty($this-&gt;data)){
      if($this-&gt;Auth-&gt;login()) {
          if(!empty($this-&gt;data['User']['remember_me'])){
              $cookie = array('id' =&gt; $this-&gt;Auth-&gt;user('id'),
              );
              $expires=strtotime($this-&gt;appConfigurations['remember_me'],time());
              $this-&gt;Cookie-&gt;write('Auth.User', $cookie, false, $this-&gt;appConfigurations['remember_me']);
          }
      }
  }
  </code></pre>
  
  <p>Now right after I set this cookie I can place a $this->cookie->read('Auth.User'); and get the value of this cookie, however it does not show up in the browsers (Chrome, FireFox) cookie list.</p>
  
  <p>If I use plain PHP cookies, via setcookie() I can see the cookie but of course the Cake Cookie read does not work with those cookies. What should I look for to resolve this issue?</p>
  
  <p>I did find a work around, but I don't like it because it just bypasses the framework. I found out how cake is creating the cookies and for these cookies I use cakes cookie creation algorithm in my code and use setcookie() to do the setting. Just for anyone else that may want or need to use the work around:</p>
  
  <pre><code>$cookieValue=$this-&gt;Auth-&gt;user('id');
  setcookie('CakeCookie[Auth][User]',$cookieValue,$expires,'/');
  </code></pre>
  
  <p>Now you can use cakes cookie component to read the value. There is more you have to change if your value is an array, read through the cookie.php code to see what you would need to do. Also I left out the encryption that too can be found in the cookie.php and your apps settings. For this issue I do not need array values since I am only store the users ID. and I did put in place encryption unlike above.</p>
  
  <p>I would still like to know why the component is not working though.</p>