r1440: - Fixed a huge bug in Authentication::_syncBugdarUser() that would use the...
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 11 Mar 2007 21:44:23 +0000 (21:44 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 11 Mar 2007 21:44:23 +0000 (21:44 +0000)
- Only call Authenticatoin::clearCookies() in Autthentication::authenticateCookies() if the cookie data fails to verify, and not in other cases

includes/auth/auth.php

index b4d54d7bc2a4674c22ee68d23e6834a516f0cc41..6326cf3aff5db35f20fc7414c97bc62357c474ca 100644 (file)
@@ -149,16 +149,13 @@ class Authentication
        {
                if (!$this->_fetchCookieUniqueId() OR !$this->_fetchCookiePassword())
                {
-                       $this->clearCookies();
                        return false;
                }
                
                $this->authUser = $this->_fetchUserUsingCookies();
-               
                if (!$this->authUser)
                {
                        $this->authUser = null;
-                       $this->clearCookies();
                        return false;
                }
                
@@ -298,7 +295,7 @@ class Authentication
                $change = false;
                
                $user = new UserAPI($this->registry);
-               $user->set('userid', $this->authUser[ $this->fieldMap['authid'] ]);
+               $user->set('userid', $this->bugdarUser['userid']);
                $user->set_condition();
                foreach ($fields AS $bugdar => $auth)
                {