title: auth problems (security filters) in sfGuardUser Symfony
body: <p>I'm using Symfony 1.2.7, and sfGuardUser Plugin. I'm able to view all the pages, login and logout. However when I try to edit (just going to the form) or update an object (saving the changes) <strong>sometimes</strong> I have problems of auth, and symfony redirects me to the edit form page again. I put some emphasys on <strong>sometimes</strong> because it's what it's driving me crazy :)</p>
  
  <p>Users have cookies and the remember_cookie. I'm using the cookie domain ".domain.com" for both cookies because we work with subdomains.</p>
  
  <p>On filters.yml I have the following:</p>
  
  <pre><code>security: ~
  
  remember:
    class:   sfGuardBasicSecurityFilter
  </code></pre>
  
  <p>that filter is the one used by many:</p>
  
  <pre><code>class sfGuardBasicSecurityFilter extends sfFilter
  {
    public function execute ($filterChain)
    {
      if ($this-&gt;isFirstCall() &amp;&amp; !$this-&gt;getContext()-&gt;getUser()-&gt;isAuthenticated())
      {
        if ($cookie = $this-&gt;getContext()-&gt;getRequest()-&gt;getCookie(sfConfig::get('app_sf_guard_plugin_remember_cookie_name', 'sfRemember')))
        {
          $q = Doctrine_Query::create()
                -&gt;from('sfGuardRememberKey r')
                -&gt;innerJoin('r.sfGuardUser u')
                -&gt;where('r.remember_key = ?', $cookie);
  
          if ($q-&gt;count())
          {
            $this-&gt;getContext()-&gt;getUser()-&gt;signIn($q-&gt;fetchOne()-&gt;sfGuardUser);
          }
        }
      }
  
      $filterChain-&gt;execute();
    }
  }
  </code></pre>
  
  <p>On the module/config/security.yml</p>
  
  <pre><code>edit:
    is_secure:   on
  
  update:
    is_secure:   on
  </code></pre>
  
  <p>Looking at http headers, it returs me a HTTP 302 answer. If I look at the code that provokes that redirection; I've noticed that it seems like just before the edit or update action it doesn't recognize the user:</p>
  
  <pre><code>Jul 08 19:03:15 symfony [info] {sfFilterChain} Executing filter "sfBasicSecurityFilter"
  Jul 08 19:03:15 symfony [info] {sfFilterChain} Executing filter "sfRenderingFilter"
  Jul 08 19:03:15 symfony [info] {sfFilterChain} Executing filter "sfGuardBasicSecurityFilter"
  Jul 08 19:03:15 symfony [info] {sfDoctrineLogger} executeQuery : SELECT COUNT(*) AS num_results FROM (SELECT s.id, s.ip_address FROM sf_guard_remember_key s ...
  Jul 08 19:03:16 symfony [info] {sfDoctrineLogger} executeQuery : SELECT s.id AS s__id, s.user_id AS s__user_id, s.remember_key AS s__remember_key, s.ip_address ...
  Jul 08 19:03:16 symfony [info] {myUser} User is authenticated
  Jul 08 19:03:16 symfony [info] {sfDoctrineLogger} executeQuery : SELECT s.id AS s__id, s.name AS s__name, s.description AS s__description, s.created_at AS ....
  Jul 08 19:03:16 symfony [info] {sfDoctrineLogger} executeQuery : SELECT s.id AS s__id, s.name AS s__name, s.description AS s__description, s.created_at AS ....
  Jul 08 19:03:16 symfony [info] {myUser} Add credential(s) ""
  Jul 08 19:03:16 symfony [info] {sfDoctrineLogger} executeQuery : UPDATE sf_guard_user SET last_login = ?, updated_at = ? WHERE id = ? - (...
  Jul 08 19:03:16 symfony [info] {sfFilterChain} Executing filter "subdomainFilter"
  </code></pre>
  
  <p>Any idea on where can I keep looking or how I can fix it?</p>
  
  <p>Thanks a lot!</p>