Redirect to login screen if not authenticated for this application.
authorJan Schneider <jan@horde.org>
Tue, 3 Aug 2010 08:47:07 +0000 (10:47 +0200)
committerJan Schneider <jan@horde.org>
Tue, 3 Aug 2010 17:30:46 +0000 (19:30 +0200)
framework/Core/lib/Horde/Core/Prefs/Ui.php

index 3f34b99..0576c5b 100644 (file)
@@ -104,7 +104,14 @@ class Horde_Core_Prefs_Ui
         $this->vars = $vars;
 
         /* Load the application's base environment. */
-        $GLOBALS['registry']->pushApp($this->app);
+        try {
+            $GLOBALS['registry']->pushApp($this->app);
+        } catch (Horde_Exception $e) {
+            if ($e->getCode() == Horde_Registry::AUTH_FAILURE) {
+                $GLOBALS['registry']->authenticateFailure($this->app, $e);
+            }
+            throw $e;
+        }
 
         /* Load preferences. */
         $this->_loadPrefs($this->app);