Move authenticateFailure() and getLogoutUrl() from horde/Auth to horde/Core
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 1 Jun 2010 19:11:26 +0000 (13:11 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 2 Jun 2010 03:32:20 +0000 (21:32 -0600)
41 files changed:
babel/lib/base.php
crumb/lib/base.php
fima/lib/base.php
folks/account/approve.php
folks/account/renew.php
folks/account/resetpassword.php
folks/account/signup.php
folks/account/username.php
folks/edit/friends/approve.php
folks/edit/friends/reject.php
folks/edit/password.php
folks/edit/tabs.php
folks/friends.php
folks/lib/base.php
framework/Auth/lib/Horde/Auth.php
framework/Core/lib/Horde.php
framework/Core/lib/Horde/Registry.php
horde/lib/LoginTasks/Task/TosAgreement.php
horde/services/ajax.php
horde/services/portal/sidebar.php
jonah/channels/index.php
kastalia/download.php
kastalia/lib/base.php
news/add.php
news/admin/tabs.php
news/lib/base.php
news/reads.php
skoli/lib/base.php
vilma/domains/delete.php
vilma/domains/edit.php
vilma/domains/index.php
vilma/lib/base.php
vilma/users/delete.php
vilma/users/edit.php
vilma/users/editAlias.php
vilma/users/editForward.php
vilma/users/index.php
vilma/virtuals/delete.php
vilma/virtuals/edit.php
vilma/virtuals/index.php
whups/admin/index.php

index bd06231..149b828 100644 (file)
@@ -28,7 +28,7 @@ $registry = new Horde_Registry();
 try {
     $registry->pushApp('babel', array('logintasks' => true));
 } catch (Horde_Exception $e) {
-    Horde_Auth::authenticateFailure('babel', $e);
+    $registry->authenticateFailure('babel', $e);
 }
 
 $conf = &$GLOBALS['conf'];
index 47d1856..56437d8 100644 (file)
@@ -24,7 +24,7 @@ $registry = new Horde_Registry();
 try {
     $registry->pushApp('crumb', array('logintasks' => true));
 } catch (Horde_Exception $e) {
-    Horde_Auth::authenticateFailure('crumb', $e);
+    $registry->authenticateFailure('crumb', $e);
 }
 $conf = &$GLOBALS['conf'];
 @define('CRUMB_TEMPLATES', $registry->get('templates'));
index f3ab522..edf5663 100644 (file)
@@ -28,7 +28,7 @@ if ($session_control == 'none') {
 try {
     $registry->pushApp('fima', array('logintasks' => true));
 } catch (Horde_Exception $e) {
-    Horde_Auth::authenticateFailure('fima', $e);
+    $registry->authenticateFailure('fima', $e);
 }
 $conf = &$GLOBALS['conf'];
 @define('FIMA_TEMPLATES', $registry->get('templates'));
index 81e4074..2d878f2 100644 (file)
@@ -18,34 +18,34 @@ $title = _("Confirm email");
 $code = Horde_Util::getGet('code');
 if (empty($code)) {
     $notification->push(_("You must supply a confirmation code."));
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 // Get supplied username
 $user = Horde_Util::getGet('user');
 if (empty($code)) {
     $notification->push(_("You must supply a username."));
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 // Get user profile
 $profile = $folks_driver->getProfile($user);
 if ($profile instanceof PEAR_Error) {
     $notification->push($profile);
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 // This pages is only to activate users
 if ($profile['user_status'] != 'inactive') {
     $notification->push(_("User \"%s\" was already activated."));
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 // Get internal confirmation code
 $internal_code = $folks_driver->getConfirmationCode($user, 'activate');
 if ($internal_code instanceof PEAR_Error) {
     $notification->push($internal_code);
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 // Check code
@@ -60,4 +60,4 @@ if ($internal_code == $code) {
     $notification->push(_("The code is not right. If you copy and paste the link from your email, please check if you copied the whole string."), 'horde.warning');
 }
 
-Horde_Auth::authenticateFailure('folks');
+$registry->authenticateFailure('folks');
index a8d3390..94107d0 100644 (file)
@@ -18,34 +18,34 @@ $title = _("Renew account");
 $code = Horde_Util::getGet('code');
 if (empty($code)) {
     $notification->push(_("You must supply a confirmation code."));
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 // Get supplied username
 $user = Horde_Util::getGet('user');
 if (empty($code)) {
     $notification->push(_("You must supply a username."));
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 // Get user profile
 $profile = $folks_driver->getProfile($user);
 if ($profile instanceof PEAR_Error) {
     $notification->push($profile);
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 // This pages is only to activate users
 if ($profile['user_status'] != 'deleted') {
     $notification->push(_("User \"%s\" is not market to be in the removal process."));
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 // Get internal confirmation code
 $internal_code = $folks_driver->getConfirmationCode($user, 'renew');
 if ($internal_code instanceof PEAR_Error) {
     $notification->push($internal_code);
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 // Check code
@@ -60,4 +60,4 @@ if ($internal_code == $code) {
     $notification->push(_("The code is not right. If you copy and paste the link from your email, please check if you copied the whole string."), 'horde.warning');
 }
 
-Horde_Auth::authenticateFailure('folks');
+$registry->authenticateFailure('folks');
index 17f5e1d..764dfce 100644 (file)
@@ -38,7 +38,7 @@ if ($registry->isAuthenticated()) {
 $auth = $injector->getInstance('Horde_Auth')->getOb();
 if (!$auth->hasCapability('resetpassword')) {
     $notification->push(_("Cannot reset password automatically, contact your administrator."), 'horde.error');
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 $vars = Horde_Variables::getDefaultVariables();
@@ -81,7 +81,7 @@ if ($form->validate()) {
     $email = Folks::getUserEmail($info['username']);
     if ($email instanceof PEAR_Error) {
         $notification->push($email);
-        Horde_Auth::authenticateFailure('folks');
+        $registry->authenticateFailure('folks');
     }
 
     /* Check the given values with the prefs stored ones. */
@@ -92,7 +92,7 @@ if ($form->validate()) {
         $password = $auth->resetPassword($info['username']);
         if ($password instanceof PEAR_Error) {
             $notification->push($password);
-            Horde_Auth::authenticateFailure('folks');
+            $registry->authenticateFailure('folks');
         }
 
         $body = sprintf(_("Your new password for %s is: %s. \n\n It was requested by %s on %s"),
@@ -104,7 +104,7 @@ if ($form->validate()) {
         Folks::sendMail($email, _("Your password has been reset"), $body);
 
         $notification->push(sprintf(_("Your password has been reset, check your email (%s) and log in with your new password."), $email), 'horde.success');
-        Horde_Auth::authenticateFailure('folks');
+        $registry->authenticateFailure('folks');
     } else {
         /* Info submitted does not match what is in prefs, redirect user back
          * to login. */
index 16148c2..031e7ad 100644 (file)
@@ -18,13 +18,13 @@ $auth = $injector->getInstance('Horde_Auth')->getOb();
 if ($conf['signup']['allow'] !== true ||
     !$auth->hasCapability('add')) {
     $notification->push(_("User Registration has been disabled for this site."), 'horde.error');
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 $signup = $injector->getInstance('Horde_Core_Auth_Signup');
 if ($signup instanceof PEAR_Error) {
     $notification->push($signup, 'horde.error');
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 $vars = Horde_Variables::getDefaultVariables();
@@ -43,7 +43,7 @@ if ($form->validate()) {
             $success_message = sprintf(_("Added \"%s\" to the system. You can log in now."), $info['user_name']);
         }
         $notification->push($success_message, 'horde.success');
-        Horde_Auth::authenticateFailure('folks');
+        $registry->authenticateFailure('folks');
     } catch (Horde_Exception $e) {
         $notification->push(sprintf(_("There was a problem adding \"%s\" to the system: %s"), $info['user_name'], $e->getMessage()), 'horde.error');
     }
index 72c269b..583167c 100644 (file)
@@ -41,7 +41,7 @@ if ($form->validate()) {
         Folks::sendMail($info['email'], _("Your username was requested"), $body);
 
         $notification->push(sprintf(_("Your username was sent, check your email (%s)."), $users['user_email']), 'horde.success');
-        Horde_Auth::authenticateFailure('folks');
+        $registry->authenticateFailure('folks');
     }
 }
 
index d43b6f5..0c7ebf4 100644 (file)
@@ -15,7 +15,7 @@ require_once dirname(__FILE__) . '/../../lib/base.php';
 require_once FOLKS_BASE . '/lib/Friends.php';
 
 if (!$registry->isAuthenticated()) {
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 $user = Horde_Util::getGet('user');
index 628dcf6..a085539 100644 (file)
@@ -15,7 +15,7 @@ require_once dirname(__FILE__) . '/../../lib/base.php';
 require_once FOLKS_BASE . '/lib/Friends.php';
 
 if (!$registry->isAuthenticated()) {
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 $user = Horde_Util::getGet('user');
index 21ae062..f02457d 100644 (file)
@@ -19,7 +19,7 @@ require_once 'tabs.php';
 $auth = $injector->getInstance('Horde_Auth')->getOb();
 if (!$auth->hasCapability('resetpassword')) {
     $notification->push(_("Cannot update password, contact your administrator."), 'horde.error');
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 */
 
index 12ef405..e4632a3 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 if (!$registry->isAuthenticated()) {
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 $vars = Horde_Variables::getDefaultVariables();
index 0859029..6e6aa73 100644 (file)
@@ -15,7 +15,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 require_once FOLKS_BASE . '/lib/Forms/Activity.php';
 
 if (!$registry->isAuthenticated()) {
-    Horde_Auth::authenticateFailure('folks');
+    $registry->authenticateFailure('folks');
 }
 
 $title = _("Friends");
index 19480b6..2b1f81b 100644 (file)
@@ -21,7 +21,7 @@ $registry = new Horde_Registry();
 try {
     $registry->pushApp('folks', array('check_perms' => (Horde_Util::nonInputVar('folks_authentication') != 'none')));
 } catch (Horde_Exception $e) {
-    Horde_Auth::authenticateFailure('folks', $e);
+    $registry->authenticateFailure('folks', $e);
 }
 $conf = &$GLOBALS['conf'];
 define('FOLKS_TEMPLATES', $registry->get('templates'));
index 07fc34e..13e9274 100644 (file)
@@ -386,102 +386,6 @@ class Horde_Auth
     }
 
     /**
-     * Handle authentication failures, redirecting to the login page
-     * when appropriate.
-     *
-     * @param string $app         The app which failed authentication.
-     * @param Horde_Exception $e  An exception thrown by
-     *                            Horde_Registry::pushApp().
-     *
-     * @throws Horde_Exception
-     */
-    static public function authenticateFailure($app = 'horde', $e = null)
-    {
-        if (Horde_Cli::runningFromCLI()) {
-            $cli = new Horde_Cli();
-            $cli->fatal(_("You are not authenticated."));
-        }
-
-        if (is_null($e)) {
-            $params = array();
-        } else {
-            switch ($e->getCode()) {
-            case Horde_Registry::PERMISSION_DENIED:
-                $params = array('app' => $app, 'reason' => self::REASON_MESSAGE, 'msg' => $e->getMessage());
-                break;
-
-            case Horde_Registry::AUTH_FAILURE:
-                $params = array('app' => $app);
-                break;
-
-            default:
-                throw $e;
-            }
-        }
-
-        header('Location: ' . self::getLogoutUrl($params));
-        exit;
-    }
-
-    /**
-     * Return a URL to the login screen, adding the necessary logout
-     * parameters.
-     * If no reason/msg is passed in, use the current global authentication
-     * error message.
-     *
-     * @param array $options  Additional options:
-     * <pre>
-     * 'app' - (string) Authenticate to this application
-     *         DEFAULT: Horde
-     * 'msg' - (string) If reason is self::REASON_MESSAGE, the message
-     *         to display to the user.
-     *         DEFAULT: None
-     * 'params' - (array) Additional params to add to the URL (not allowed:
-     *            'app', 'horde_logout_token', 'msg', 'nosidebar', 'reason',
-     *            'url').
-     *            DEFAULT: None
-     * 'reason' - (integer) The reason for logout
-     *            DEFAULT: None
-     * </pre>
-     *
-     * @return string The formatted URL
-     */
-    static public function getLogoutUrl($options = array())
-    {
-        if (!isset($options['reason'])) {
-            $options['reason'] = self::getAuthError();
-        }
-
-        if (empty($options['app']) ||
-            ($options['app'] == 'horde') ||
-            ($options['reason'] == self::REASON_LOGOUT)) {
-            $params = array(
-                'horde_logout_token' => Horde::getRequestToken('horde.logout'),
-                'nosidebar' => 1
-            );
-        } else {
-            $params = array(
-                'url' => Horde::selfUrl(true, true, true)
-            );
-        }
-
-        if (isset($options['app'])) {
-            $params['app'] = $options['app'];
-        }
-
-        if ($options['reason']) {
-            $params[self::REASON_PARAM] = $options['reason'];
-            if ($options['reason'] == self::REASON_MESSAGE) {
-                $params[self::REASON_MSG_PARAM] = empty($options['msg'])
-                    ? self::getAuthError(true)
-                    : $options['msg'];
-            }
-        }
-
-        return Horde::getServiceLink('login', 'horde')->add($params)->setRaw(true);
-    }
-
-    /**
      * Return whether the authentication backend requested a password change.
      *
      * @return boolean Whether the backend requested a password change.
index d26906f..ac97489 100644 (file)
@@ -462,7 +462,7 @@ HTML;
                 ->add('return_url', urlencode(self::selfUrl(true, true, true)));
 
         case 'logout':
-            return Horde_Auth::getLogoutUrl(array('reason' => Horde_Auth::REASON_LOGOUT))->setRaw(false);
+            return $GLOBALS['registry']->getLogoutUrl(array('reason' => Horde_Auth::REASON_LOGOUT))->setRaw(false);
 
         case 'login':
             return self::url($webroot . '/login.php');
index c27961b..ea7e839 100644 (file)
@@ -192,7 +192,7 @@ class Horde_Registry
                 throw $e;
             }
 
-            Horde_Auth::authenticateFailure($app, $e);
+            $GLOBALS['registry']->authenticateFailure($app, $e);
         }
 
         $GLOBALS['registry']->initialApp = $app;
@@ -1689,4 +1689,99 @@ class Horde_Registry
         return $auth->transparent();
     }
 
+    /**
+     * Handle authentication failures, redirecting to the login page
+     * when appropriate.
+     *
+     * @param string $app         The app which failed authentication.
+     * @param Horde_Exception $e  An exception thrown by pushApp().
+     *
+     * @throws Horde_Exception
+     */
+    public function authenticateFailure($app = 'horde', $e = null)
+    {
+        if (Horde_Cli::runningFromCLI()) {
+            $cli = new Horde_Cli();
+            $cli->fatal(_("You are not authenticated."));
+        }
+
+        if (is_null($e)) {
+            $params = array();
+        } else {
+            switch ($e->getCode()) {
+            case self::PERMISSION_DENIED:
+                $params = array('app' => $app, 'reason' => Horde_Auth::REASON_MESSAGE, 'msg' => $e->getMessage());
+                break;
+
+            case self::AUTH_FAILURE:
+                $params = array('app' => $app);
+                break;
+
+            default:
+                throw $e;
+            }
+        }
+
+        header('Location: ' . $this->getLogoutUrl($params));
+        exit;
+    }
+
+    /**
+     * Return a URL to the login screen, adding the necessary logout
+     * parameters.
+     * If no reason/msg is passed in, use the current global authentication
+     * error message.
+     *
+     * @param array $options  Additional options:
+     * <pre>
+     * 'app' - (string) Authenticate to this application
+     *         DEFAULT: Horde
+     * 'msg' - (string) If reason is Horde_Auth::REASON_MESSAGE, the message
+     *         to display to the user.
+     *         DEFAULT: None
+     * 'params' - (array) Additional params to add to the URL (not allowed:
+     *            'app', 'horde_logout_token', 'msg', 'nosidebar', 'reason',
+     *            'url').
+     *            DEFAULT: None
+     * 'reason' - (integer) The reason for logout
+     *            DEFAULT: None
+     * </pre>
+     *
+     * @return string The formatted URL
+     */
+    public function getLogoutUrl(array $options = array())
+    {
+        if (!isset($options['reason'])) {
+            $options['reason'] = Horde_Auth::getAuthError();
+        }
+
+        if (empty($options['app']) ||
+            ($options['app'] == 'horde') ||
+            ($options['reason'] == Horde_Auth::REASON_LOGOUT)) {
+            $params = array(
+                'horde_logout_token' => Horde::getRequestToken('horde.logout'),
+                'nosidebar' => 1
+            );
+        } else {
+            $params = array(
+                'url' => Horde::selfUrl(true, true, true)
+            );
+        }
+
+        if (isset($options['app'])) {
+            $params['app'] = $options['app'];
+        }
+
+        if ($options['reason']) {
+            $params[Horde_Auth::REASON_PARAM] = $options['reason'];
+            if ($options['reason'] == Horde_Auth::REASON_MESSAGE) {
+                $params[Horde_Auth::REASON_MSG_PARAM] = empty($options['msg'])
+                    ? Horde_Auth::getAuthError(true)
+                    : $options['msg'];
+            }
+        }
+
+        return Horde::getServiceLink('login', 'horde')->add($params)->setRaw(true);
+    }
+
 }
index a127945..689ab30 100644 (file)
@@ -50,7 +50,7 @@ class Horde_LoginTasks_Task_TosAgreement extends Horde_LoginTasks_Task
     {
         if (Horde_Util::getFormData('not_agree')) {
             Horde_Auth::setAuthError(Horde_Auth::REASON_MESSAGE, _("You did not agree to the Terms of Service agreement, so you were not allowed to login."));
-            Horde_Auth::authenticateFailure('horde');
+            $GLOBALS['registry']->authenticateFailure('horde');
         }
     }
 
index eb9756c..7d48e64 100644 (file)
@@ -38,12 +38,12 @@ try {
         /* Handle session timeouts when they come from an AJAX request. */
         if ($e->getCode() == Horde_Registry::AUTH_FAILURE) {
             $ajax = Horde_Ajax::getInstance($app);
-            $GLOBALS['notification']->push(str_replace('&amp;', '&', Horde_Auth::getLogoutUrl(array('reason' => Horde_Auth::REASON_SESSION))), 'horde.ajaxtimeout', array('content.raw'));
+            $notification->push(str_replace('&amp;', '&', $registry->getLogoutUrl(array('reason' => Horde_Auth::REASON_SESSION))), 'horde.ajaxtimeout', array('content.raw'));
             Horde::sendHTTPResponse(Horde::prepareResponse(null, $ajax->notify), $ajax->responseType());
             exit;
         }
 
-        Horde_Auth::authenticateFailure($app, $e);
+        $registry->authenticateFailure($app, $e);
     }
 }
 
index ca16446..221fd2d 100644 (file)
@@ -208,7 +208,7 @@ require_once dirname(__FILE__) . '/../../lib/Application.php';
 Horde_Registry::appInit('horde', array('authentication' => 'none'));
 
 if (!Horde_Auth::getAuth() && !$conf['menu']['always']) {
-    Horde_Auth::authenticateFailure();
+    $registry->authenticateFailure();
 }
 
 $is_mozbar = (bool)Horde_Util::getFormData('mozbar');
index 0107773..a8513f7 100644 (file)
@@ -16,7 +16,7 @@ $jonah = Horde_Registry::appInit('jonah');
 
 if (!Jonah::checkPermissions('jonah:news', Horde_Perms::EDIT)) {
     $notification->push(_("You are not authorised for this action."), 'horde.warning');
-    Horde_Auth::authenticateFailure();
+    $registry->authenticateFailure();
 }
 
 $have_news = Jonah_News::getAvailableTypes();
index 9246915..2682ee0 100755 (executable)
@@ -34,7 +34,7 @@ $registry = new Horde_Registry();
 try {
     $registry->pushApp('kastalia', array('logintasks' => true));
 } catch (Horde_Exception $e) {
-    Horde_Auth::authenticateFailure('kastalia', $e);
+    $registry->authenticateFailure('kastalia', $e);
 }
 //################### </MANUELLER ANMELDE CHECK (WENN base.php NICHT INCLUDIERT WIRD)> ###################
 
index 1f8b6cb..104833b 100644 (file)
@@ -24,7 +24,7 @@ $registry = new Horde_Registry();
 try {
     $registry->pushApp('kastalia', array('logintasks' => true));
 } catch (Horde_Exception $e) {
-    Horde_Auth::authenticateFailure('kastalia', $e);
+    $registry->authenticateFailure('kastalia', $e);
 }
 $conf = &$GLOBALS['conf'];
 @define('KASTALIA_TEMPLATES', $registry->get('templates'));
index ca5ec7b..f6ef15b 100644 (file)
@@ -90,7 +90,7 @@ function _max_upload_size()
 // Is logged it?
 if (!$registry->isAuthenticated()) {
     $notification->push(_("Only authenticated users can post news."), 'horde.warning');
-    Horde_Auth::authenticateFailure('news');
+    $registry->authenticateFailure('news');
 }
 
 // Default vars
index 53bcc48..bda8b0d 100644 (file)
@@ -13,7 +13,7 @@
 /* Only admin should be using this. */
 if (!$registry->isAdmin(array('permission' => 'news:admin'))) {
     $notification->push(_("You are not authorised for this action."), 'horde.warning');
-    Horde_Auth::authenticateFailure('news');
+    $registry->authenticateFailure('news');
 }
 
 $vars = Horde_Variables::getDefaultVariables();
index 56a9a16..2d4ff8c 100644 (file)
@@ -27,7 +27,7 @@ $registry = new Horde_Registry();
 try {
     $registry->pushApp('news', array('check_perms' => (Horde_Util::nonInputVar('news_authentication') != 'none'), 'logintasks' => true));
 } catch (Horde_Exception $e) {
-    Horde_Auth::authenticateFailure('news', $e);
+    $registry->authenticateFailure('news', $e);
 }
 $conf = &$GLOBALS['conf'];
 define('NEWS_TEMPLATES', $registry->get('templates'));
index fbabfda..81657bf 100644 (file)
@@ -14,7 +14,7 @@
 require_once dirname(__FILE__) . '/lib/base.php';
 
 if (!$registry->isAuthenticated()) {
-    Horde_Auth::authenticateFailure('news');
+    $registry->authenticateFailure('news');
 }
 
 $id = Horde_Util::getFormData('id', 0);
index a04f8aa..4c535b1 100644 (file)
@@ -20,7 +20,7 @@ $registry = new Horde_Registry();
 try {
     $registry->pushApp('skoli', array('check_perms' => (Horde_Util::nonInputVar('skoli_authentication') != 'none'), 'logintasks' => true));
 } catch (Horde_Exception $e) {
-    Horde_Auth::authenticateFailure('skoli', $e);
+    $registry->authenticateFailure('skoli', $e);
 }
 $conf = &$GLOBALS['conf'];
 @define('SKOLI_TEMPLATES', $registry->get('templates'));
index 999f35f..0f8f7fd 100644 (file)
@@ -15,7 +15,7 @@ require_once VILMA_BASE . '/lib/Forms/DeleteDomainForm.php';
 
 /* Only admin should be using this. */
 if (!Vilma::hasPermission($domain)) {
-    Horde_Auth::authenticateFailure('vilma', $e);
+    $registry->authenticateFailure('vilma', $e);
 }
 
 $vars = Horde_Variables::getDefaultVariables();
index 36b7b22..d303060 100644 (file)
@@ -15,7 +15,7 @@ require_once VILMA_BASE . '/lib/Forms/EditDomainForm.php';
 
 /* Only admin should be using this. */
 if (!Vilma::hasPermission($domain)) {
-    Horde_Auth::authenticateFailure('vilma', $e);
+    $registry->authenticateFailure('vilma', $e);
 }
 
 //$domain_id = Horde_Util::getFormData('domain_id');
index 5ace933..4f0b2d3 100644 (file)
@@ -13,7 +13,7 @@ require_once VILMA_BASE . '/lib/base.php';
 
 /* Only admin should be using this. */
 if (!Vilma::hasPermission($domain)) {
-    Horde_Auth::authenticateFailure('vilma', $e);
+    $registry->authenticateFailure('vilma', $e);
 }
 
 // Having a current domain doesn't make sense on this page
index d7b8887..fb55cb4 100644 (file)
@@ -25,7 +25,7 @@ try {
     $registry->pushApp('vilma', !defined('AUTH_HANDLER'));
 } catch (Horde_Exception $e) {
     if ($e->getCode() == 'permission_denied') {
-        Horde_Auth::authenticateFailure('vilma', $e);
+        $registry->authenticateFailure('vilma', $e);
     }
     Horde::fatal($e, __FILE__, __LINE__, false);
 }
index 08720ec..01dd2c1 100644 (file)
@@ -14,7 +14,7 @@ require_once 'Horde/Form.php';
 
 /* Only admin should be using this. */
 if (!Vilma::hasPermission($domain)) {
-    Horde_Auth::authenticateFailure('vilma', $e);
+    $registry->authenticateFailure('vilma', $e);
 }
 
 $vars = Horde_Variables::getDefaultVariables();
index 03056c9..ad00904 100644 (file)
@@ -19,7 +19,7 @@ require_once VILMA_BASE . '/lib/Forms/EditUserForm.php';
 
 /* Only admin should be using this. */
 if (!Vilma::hasPermission($domain)) {
-    Horde_Auth::authenticateFailure('vilma', $e);
+    $registry->authenticateFailure('vilma', $e);
 }
 $vars = Horde_Variables::getDefaultVariables();
 $address = $vars->get('address');
index 784e7fa..05483d2 100644 (file)
@@ -19,7 +19,7 @@ require_once VILMA_BASE . '/lib/Forms/EditAliasForm.php';
 
 /* Only admin should be using this. */
 if (!Vilma::hasPermission($domain)) {
-    Horde_Auth::authenticateFailure('vilma', $e);
+    $registry->authenticateFailure('vilma', $e);
 }
 $vars = Variables::getDefaultVariables();
 
index 57afa23..af3caab 100644 (file)
@@ -19,7 +19,7 @@ require_once VILMA_BASE . '/lib/Forms/EditForwardForm.php';
 
 /* Only admin should be using this. */
 if (!Vilma::hasPermission($domain)) {
-    Horde_Auth::authenticateFailure('vilma', $e);
+    $registry->authenticateFailure('vilma', $e);
 }
 $vars = Variables::getDefaultVariables();
 
index dde6d1d..d4381e4 100644 (file)
@@ -15,7 +15,7 @@ require_once VILMA_BASE . '/lib/base.php';
 
 /* Only admin should be using this. */
 if (!Vilma::hasPermission($curdomain)) {
-    Horde_Auth::authenticateFailure('vilma', $e);
+    $registry->authenticateFailure('vilma', $e);
 }
 
 // Input validation: make sure we have a valid section
index a1a9fa5..c369772 100644 (file)
@@ -14,7 +14,7 @@ require_once 'Horde/Form.php';
 
 /* Only admin should be using this. */
 if (!$registry->isAdmin()) {
-    Horde_Auth::authenticateFailure('vilma', $e);
+    $registry->authenticateFailure('vilma', $e);
 }
 
 $vars = Horde_Variables::getDefaultVariables();
index a022969..c1af4d3 100644 (file)
@@ -15,7 +15,7 @@ require_once 'Horde/Form/Action.php';
 
 /* Only admin should be using this. */
 if (!$registry->isAdmin() && !Vilma::isDomainAdmin()) {
-    Horde_Auth::authenticateFailure('vilma', $e);
+    $registry->authenticateFailure('vilma', $e);
 }
 
 $domain = Vilma::getDomain();
index 11fccc8..01de54f 100644 (file)
@@ -13,7 +13,7 @@ require_once VILMA_BASE . '/lib/base.php';
 
 /* Only admin should be using this. */
 if (!$registry->isAdmin() && !Vilma::isDomainAdmin()) {
-    Horde_Auth::authenticateFailure('vilma', $e);
+    $registry->authenticateFailure('vilma', $e);
 }
 
 $user = Horde_Util::getFormData('user');
index 4d6391f..aa7856f 100644 (file)
@@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('whups');
 
 if (!$registry->isAdmin(array('permission' => 'whups:admin'))) {
-    Horde_Auth::authenticateFailure('whups', $e);
+    $registry->authenticateFailure('whups', $e);
 }
 
 // Set up the page config vars.