Bug #9085: get clean session if doing transparent auth in a non authenticated Horde...
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 28 Jun 2010 19:29:22 +0000 (13:29 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 28 Jun 2010 19:29:22 +0000 (13:29 -0600)
framework/Core/lib/Horde/Registry.php

index f8c8858..e1adf8d 100644 (file)
@@ -1663,17 +1663,18 @@ class Horde_Registry
         if ($this->getAuth() &&
             (($app == 'horde') ||
              isset($_SESSION['horde_auth']['app'][$app]))) {
-            if ($this->checkExistingAuth($app)) {
-                return true;
-            }
-
-            return false;
+            return $this->checkExistingAuth($app);
         }
 
         /* Try transparent authentication. */
-        return empty($options['notransparent'])
-            ? $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth($app)->transparent()
-            : false;
+        if (empty($options['notransparent'])) {
+            if (!$this->getAuth()) {
+                $this->getCleanSession();
+            }
+            return $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth($app)->transparent();
+        }
+
+        return false;
     }
 
     /**