Make sure there is always logout reason set on validation failure
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 25 Jan 2011 08:34:27 +0000 (01:34 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 25 Jan 2011 10:08:09 +0000 (03:08 -0700)
framework/Core/lib/Horde/Registry.php

index 5abda82..fb18ef8 100644 (file)
@@ -2136,7 +2136,16 @@ class Horde_Registry
             return false;
         }
 
-        return $auth->validateAuth();
+        if ($auth->validateAuth()) {
+            return true;
+        }
+
+        /* Make sure there is always a logout reason set. */
+        if (!$auth->getError()) {
+            $auth->setError(Horde_Auth::REASON_SESSION);
+        }
+
+        return false;
     }
 
     /* NLS functions. */