diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 517f3fb..6ed2b1b 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -241,6 +241,13 @@ class Horde_Registry $appob = $registry->getApiInstance($app, 'application'); $appob->initParams = $args; + if ($args['user_admin']) { + if (empty($GLOBALS['conf']['auth']['admins'])) { + throw new Horde_Exception('No admin users defined in configuration.'); + } + $registry->setAuth(reset($GLOBALS['conf']['auth']['admins']), array()); + } + try { $registry->pushApp($app, array('check_perms' => ($args['authentication'] != 'none'), 'logintasks' => !$args['nologintasks'], 'notransparent' => !empty($args['notransparent']))); @@ -265,12 +272,7 @@ class Horde_Registry Horde::compressOutput(); } - if ($args['user_admin']) { - if (empty($GLOBALS['conf']['auth']['admins'])) { - throw new Horde_Exception('No admin users defined in configuration.'); - } - $registry->setAuth(reset($GLOBALS['conf']['auth']['admins']), array()); - } + $appob->init();