From: Jan Schneider Date: Thu, 3 Jun 2010 22:30:16 +0000 (+0200) Subject: getOb() -> getAuth() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ca6b51851fce63520490f0c5295db8a380d281bf;p=horde.git getOb() -> getAuth() --- diff --git a/ansel/perms.php b/ansel/perms.php index c2e3717e3..62c0121ad 100644 --- a/ansel/perms.php +++ b/ansel/perms.php @@ -19,7 +19,7 @@ require_once dirname(__FILE__) . '/lib/Application.php'; Horde_Registry::appInit('ansel'); $groups = Horde_Group::singleton(); -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); $form = null; $reload = false; diff --git a/ansel/scripts/all_images_exif_to_tags.php b/ansel/scripts/all_images_exif_to_tags.php index e3b0556a0..78ce05eeb 100755 --- a/ansel/scripts/all_images_exif_to_tags.php +++ b/ansel/scripts/all_images_exif_to_tags.php @@ -56,7 +56,7 @@ Horde_Registry::appInit('ansel', array('authentication' => 'none')); // Login to horde if username & password are set. if (!empty($username) && !empty($password)) { - $auth = $injector->getInstance('Horde_Auth')->getOb(); + $auth = $injector->getInstance('Horde_Auth')->getAuth(); if (!$auth->authenticate($username, array('password' => $password))) { $cli->fatal(_("Username or password is incorrect.")); } else { diff --git a/ansel/scripts/ansel.php b/ansel/scripts/ansel.php index b7fca0d2c..9a941c473 100755 --- a/ansel/scripts/ansel.php +++ b/ansel/scripts/ansel.php @@ -88,7 +88,7 @@ foreach ($opts as $opt) { // Login to horde if username & password are set. if (!empty($username) && !empty($password)) { - $auth = $injector->getInstance('Horde_Auth')->getOb(); + $auth = $injector->getInstance('Horde_Auth')->getAuth(); if (!$auth->authenticate($username, array('password' => $password))) { $error = _("Login is incorrect."); Horde::logMessage($error, 'ERR'); diff --git a/ansel/scripts/recursive_import.php b/ansel/scripts/recursive_import.php index 3e54ed338..6a74238d8 100755 --- a/ansel/scripts/recursive_import.php +++ b/ansel/scripts/recursive_import.php @@ -61,7 +61,7 @@ foreach ($opts as $opt) { // Login to horde if username & password are set. if (!empty($username) && !empty($password)) { - $auth = $injector->getInstance('Horde_Auth')->getOb(); + $auth = $injector->getInstance('Horde_Auth')->getAuth(); if (!$auth->authenticate($username, array('password' => $password))) { $cli->fatal(_("Username or password is incorrect.")); } else { diff --git a/ansel/xppublish.php b/ansel/xppublish.php index e81d1dcb3..c4d424873 100644 --- a/ansel/xppublish.php +++ b/ansel/xppublish.php @@ -36,7 +36,7 @@ if ($cmd == 'login') { $username = Horde_Util::getFormData('username'); $password = Horde_Util::getFormData('password'); if ($username && $password) { - $auth = $injector->getInstance('Horde_Auth')->getOb(); + $auth = $injector->getInstance('Horde_Auth')->getAuth(); if ($auth->authenticate($username, array('password' => $password))) { $cmd = 'list'; diff --git a/beatnik/scripts/export_config.php b/beatnik/scripts/export_config.php index b105c5e90..254681d84 100644 --- a/beatnik/scripts/export_config.php +++ b/beatnik/scripts/export_config.php @@ -93,7 +93,7 @@ if (!empty($rpc)) { // Login to horde if username & password are set and load module. } elseif (!empty($username) && !empty($password)) { require_once HORDE_BASE . '/lib/base.php'; - $auth = $injector->getInstance('Horde_Auth')->getOb(); + $auth = $injector->getInstance('Horde_Auth')->getAuth(); if (!$auth->authenticate($username, array('password' => $password))) { $error = _("Login is incorrect."); Horde::logMessage($error, 'ERR'); diff --git a/folks/account/resetpassword.php b/folks/account/resetpassword.php index 09dd3f69e..14eccb9ae 100644 --- a/folks/account/resetpassword.php +++ b/folks/account/resetpassword.php @@ -35,7 +35,7 @@ if ($registry->isAuthenticated()) { } // Make sure auth backend allows passwords to be reset. -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); if (!$auth->hasCapability('resetpassword')) { $notification->push(_("Cannot reset password automatically, contact your administrator."), 'horde.error'); $registry->authenticateFailure('folks'); diff --git a/folks/account/signup.php b/folks/account/signup.php index 031e7ad49..1869f87af 100644 --- a/folks/account/signup.php +++ b/folks/account/signup.php @@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/tabs.php'; -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); // Make sure signups are enabled before proceeding if ($conf['signup']['allow'] !== true || diff --git a/folks/account/tabs.php b/folks/account/tabs.php index 86dae38fc..14cd20b95 100644 --- a/folks/account/tabs.php +++ b/folks/account/tabs.php @@ -13,7 +13,7 @@ $folks_authentication = 'none'; require_once dirname(__FILE__) . '/../lib/base.php'; -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); $vars = Horde_Variables::getDefaultVariables(); $tabs = new Horde_Ui_Tabs('what', $vars); diff --git a/folks/edit/password.php b/folks/edit/password.php index cdd52c01d..d27d94d12 100644 --- a/folks/edit/password.php +++ b/folks/edit/password.php @@ -16,7 +16,7 @@ require_once 'tabs.php'; /* // Make sure auth backend allows passwords to be updated. -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); if (!$auth->hasCapability('resetpassword')) { $notification->push(_("Cannot update password, contact your administrator."), 'horde.error'); $registry->authenticateFailure('folks'); diff --git a/folks/lib/Friends.php b/folks/lib/Friends.php index 857fdeffa..c648d5af5 100644 --- a/folks/lib/Friends.php +++ b/folks/lib/Friends.php @@ -218,7 +218,7 @@ class Folks_Friends { } // Check if users exits - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); if (!$auth->exists($user)) { return PEAR::raiseError(sprintf(_("User \"%s\" does not exits"), $user)); } @@ -287,7 +287,7 @@ class Folks_Friends { } // Check if users exits - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); if (!$auth->exists($friend)) { return PEAR::raiseError(sprintf(_("User \"%s\" does not exits"), $friend)); } diff --git a/folks/perms.php b/folks/perms.php index b78739fc4..6cfc718d1 100644 --- a/folks/perms.php +++ b/folks/perms.php @@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/lib/base.php'; $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope(); $groups = Horde_Group::singleton(); -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); $reload = false; $actionID = Horde_Util::getFormData('actionID', 'edit'); diff --git a/folks/rss/activity.php b/folks/rss/activity.php index 61d9571e7..d5e93c8fb 100644 --- a/folks/rss/activity.php +++ b/folks/rss/activity.php @@ -14,7 +14,7 @@ $folks_authentication = 'none'; require_once dirname(__FILE__) . '/../lib/base.php'; -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); if (!$GLOBALS['registry']->getAuth() && (!isset($_SERVER['PHP_AUTH_USER']) || !$auth->authenticate($_SERVER['PHP_AUTH_USER'], array('password' => isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null)))) { diff --git a/folks/rss/friends.php b/folks/rss/friends.php index b3a88a94a..6b42a6e4e 100644 --- a/folks/rss/friends.php +++ b/folks/rss/friends.php @@ -14,7 +14,7 @@ $folks_authentication = 'none'; require_once dirname(__FILE__) . '/../lib/base.php'; -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); if (!$GLOBALS['registry']->getAuth() && (!isset($_SERVER['PHP_AUTH_USER']) || !$auth->authenticate($_SERVER['PHP_AUTH_USER'], array('password' => isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null)))) { diff --git a/folks/rss/know.php b/folks/rss/know.php index d0f32eb2f..315e74d29 100644 --- a/folks/rss/know.php +++ b/folks/rss/know.php @@ -14,7 +14,7 @@ $folks_authentication = 'none'; require_once dirname(__FILE__) . '/../lib/base.php'; -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); if (!$GLOBALS['registry']->getAuth() && (!isset($_SERVER['PHP_AUTH_USER']) || !$auth->authenticate($_SERVER['PHP_AUTH_USER'], array('password' => isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null)))) { diff --git a/folks/scripts/mail.php b/folks/scripts/mail.php index 3291bb97a..11c3db504 100644 --- a/folks/scripts/mail.php +++ b/folks/scripts/mail.php @@ -62,7 +62,7 @@ foreach ($opts as $opt) { // Login to horde if username & password are set. if (!empty($username) && !empty($password)) { - $auth = $injector->getInstance('Horde_Auth')->getOb(); + $auth = $injector->getInstance('Horde_Auth')->getAuth(); if (!$auth->authenticate($username, array('password' => $password))) { $error = _("Login is incorrect."); Horde::logMessage($error, 'ERR'); diff --git a/framework/ActiveSync/lib/Horde/ActiveSync/Driver/Horde.php b/framework/ActiveSync/lib/Horde/ActiveSync/Driver/Horde.php index bdf8102fb..0b2f16d37 100644 --- a/framework/ActiveSync/lib/Horde/ActiveSync/Driver/Horde.php +++ b/framework/ActiveSync/lib/Horde/ActiveSync/Driver/Horde.php @@ -67,7 +67,7 @@ class Horde_ActiveSync_Driver_Horde extends Horde_ActiveSync_Driver_Base { $this->_logger->info('Horde_ActiveSync_Driver_Horde::logon attempt for: ' . $username); parent::logon($username, $password, $domain); - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); return $auth->authenticate($username, array('password' => $password)); } diff --git a/framework/Auth/lib/Horde/Auth.php b/framework/Auth/lib/Horde/Auth.php index 5e197bfaa..287f8579e 100644 --- a/framework/Auth/lib/Horde/Auth.php +++ b/framework/Auth/lib/Horde/Auth.php @@ -350,7 +350,7 @@ class Horde_Auth } } - return $GLOBALS['injector']->getInstance('Horde_Auth')->getOb()->checkExistingAuth(); + return $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth()->checkExistingAuth(); } /** diff --git a/framework/Core/lib/Horde/Core/Factory/Auth.php b/framework/Core/lib/Horde/Core/Factory/Auth.php index 05c4b1646..cf23ce705 100644 --- a/framework/Core/lib/Horde/Core/Factory/Auth.php +++ b/framework/Core/lib/Horde/Core/Factory/Auth.php @@ -61,7 +61,7 @@ class Horde_Core_Factory_Auth * @return Horde_Auth_Base The singleton instance. * @throws Horde_Auth_Exception */ - public function getOb($driver = null, array $params = array()) + public function getAuth($driver = null, array $params = array()) { if (is_null($driver)) { $driver = $GLOBALS['conf']['auth']['driver']; diff --git a/framework/Core/lib/Horde/Core/Perms/Ui.php b/framework/Core/lib/Horde/Core/Perms/Ui.php index d4cf22249..3e8d9a956 100644 --- a/framework/Core/lib/Horde/Core/Perms/Ui.php +++ b/framework/Core/lib/Horde/Core/Perms/Ui.php @@ -283,7 +283,7 @@ class Horde_Core_Perms_Ui /* Users permissions. */ $perm_val = $permission->getUserPermissions(); $this->_form->setSection('users', _("Individual Users"), Horde::img('user.png'), false); - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); if ($auth->hasCapability('list')) { /* The auth driver has list capabilities so set up an array which * the matrix field type will recognise to set up an enum box for diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index a14f49508..03c761fb0 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -1664,7 +1664,7 @@ class Horde_Registry { return ($app == 'horde') ? false - : $GLOBALS['injector']->getInstance('Horde_Auth')->getOb('application', array('app' => $app))->requireAuth(); + : $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth('application', array('app' => $app))->requireAuth(); } /** @@ -1696,8 +1696,8 @@ class Horde_Registry /* Try transparent authentication. */ $auth = (empty($options['app']) || ($options['app'] == 'horde')) - ? $GLOBALS['injector']->getInstance('Horde_Auth')->getOb() - : $GLOBALS['injector']->getInstance('Horde_Auth')->getOb('application', array('app' => $options['app'])); + ? $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth() + : $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth('application', array('app' => $options['app'])); return $auth->transparent(); } diff --git a/framework/Group/lib/Horde/Group.php b/framework/Group/lib/Horde/Group.php index 8aad91fc9..302f9d766 100644 --- a/framework/Group/lib/Horde/Group.php +++ b/framework/Group/lib/Horde/Group.php @@ -144,7 +144,7 @@ class Horde_Group $group_driver = null; $group_params = null; - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); if ($auth->hasCapability('groups')) { $group_driver = $auth->getDriver(); $group_params = $auth; diff --git a/framework/Kolab_Filter/lib/Horde/Kolab/Resource.php b/framework/Kolab_Filter/lib/Horde/Kolab/Resource.php index 02c89df9c..78e188021 100644 --- a/framework/Kolab_Filter/lib/Horde/Kolab/Resource.php +++ b/framework/Kolab_Filter/lib/Horde/Kolab/Resource.php @@ -183,7 +183,7 @@ class Kolab_Resource $calendar_user = $conf['kolab']['filter']['calendar_id'] . '@' . $domain; /* Load the authentication libraries */ - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(isset($conf['auth']['driver']) ? null : 'kolab'); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(isset($conf['auth']['driver']) ? null : 'kolab'); $authenticated = $auth->authenticate($calendar_user, array('password' => $conf['kolab']['filter']['calendar_pass']), false); diff --git a/framework/Rpc/lib/Horde/Rpc.php b/framework/Rpc/lib/Horde/Rpc.php index 150f64e51..1529e3c2a 100644 --- a/framework/Rpc/lib/Horde/Rpc.php +++ b/framework/Rpc/lib/Horde/Rpc.php @@ -115,7 +115,7 @@ class Horde_Rpc } // @TODO: inject this - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); if ($this->_request->getServer('PHP_AUTH_USER')) { $user = $this->_request->getServer('PHP_AUTH_USER'); diff --git a/framework/Rpc/lib/Horde/Rpc/Webdav.php b/framework/Rpc/lib/Horde/Rpc/Webdav.php index 27bab4c4d..ccd57759a 100644 --- a/framework/Rpc/lib/Horde/Rpc/Webdav.php +++ b/framework/Rpc/lib/Horde/Rpc/Webdav.php @@ -825,7 +825,7 @@ class Horde_Rpc_Webdav extends Horde_Rpc */ function check_auth($type, $username, $password) { - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); return $auth->authenticate($username, array('password' => $password)); } diff --git a/framework/SyncML/SyncML/Backend/Horde.php b/framework/SyncML/SyncML/Backend/Horde.php index 81933fc5f..963079d54 100644 --- a/framework/SyncML/SyncML/Backend/Horde.php +++ b/framework/SyncML/SyncML/Backend/Horde.php @@ -482,7 +482,7 @@ class SyncML_Backend_Horde extends SyncML_Backend { */ function _checkAuthentication($username, $password) { - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); return $auth->authenticate($username, array('password' => $password)) ? $GLOBALS['registry']->getAuth() : false; @@ -870,7 +870,7 @@ class SyncML_Backend_Horde extends SyncML_Backend { } /* Get an Auth object. */ - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); /* Make this user an admin for the time beeing to allow deletion of * user data. */ @@ -917,7 +917,7 @@ class SyncML_Backend_Horde extends SyncML_Backend { { /* Get an Auth object. */ try { - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); } catch (Horde_Exception $e) { // TODO } diff --git a/hermes/lib/Hermes.php b/hermes/lib/Hermes.php index 70367ee87..1a927d7a7 100644 --- a/hermes/lib/Hermes.php +++ b/hermes/lib/Hermes.php @@ -161,7 +161,7 @@ class Hermes { */ function getEmployeesType($enumtype = 'multienum') { - $auth = $GLOBALS['injector']->getInstance('Horde_Auth'); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); if (!$auth->capabilities['list']) { return array('text', array()); } diff --git a/horde/admin/groups.php b/horde/admin/groups.php index c17680ac4..b615bf5de 100644 --- a/horde/admin/groups.php +++ b/horde/admin/groups.php @@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php'; Horde_Registry::appInit('horde', array('admin' => true)); $groups = Horde_Group::singleton(); -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); $form = null; $reload = false; diff --git a/horde/admin/signup_confirm.php b/horde/admin/signup_confirm.php index c3ccefb59..8a4e64202 100644 --- a/horde/admin/signup_confirm.php +++ b/horde/admin/signup_confirm.php @@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../lib/base.php'; Horde_Registry::appInit('horde', array('authentication' => 'none')); // Make sure signups are enabled before proceeding -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); if ($conf['signup']['allow'] !== true || !$auth->hasCapability('add')) { throw new Horde_Exception(_("User Registration has been disabled for this site.")); diff --git a/horde/admin/user.php b/horde/admin/user.php index 4b4d5aec2..eb9bd5b16 100644 --- a/horde/admin/user.php +++ b/horde/admin/user.php @@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php'; Horde_Registry::appInit('horde', array('admin' => true)); -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); if ($conf['signup']['allow'] && $conf['signup']['approve']) { $signup = $injector->getInstance('Horde_Core_Auth_Signup'); diff --git a/horde/lib/Prefs/Ui.php b/horde/lib/Prefs/Ui.php index 32c8537ee..2c63a35cf 100644 --- a/horde/lib/Prefs/Ui.php +++ b/horde/lib/Prefs/Ui.php @@ -95,7 +95,7 @@ class Horde_Prefs_Ui /* Hide appropriate prefGroups. */ try { - $GLOBALS['injector']->getInstance('Horde_Auth')->getOb()->hasCapability('update'); + $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth()->hasCapability('update'); } catch (Horde_Exception $e) { $ui->suppressGroups[] = 'forgotpass'; } diff --git a/horde/login.php b/horde/login.php index 848968474..8678685cc 100644 --- a/horde/login.php +++ b/horde/login.php @@ -98,8 +98,8 @@ if (!$is_auth) { /* Get an Auth object. */ $auth = ($app && $is_auth) - ? $injector->getInstance('Horde_Auth')->getOb('application', array('app' => $app)) - : $injector->getInstance('Horde_Auth')->getOb(); + ? $injector->getInstance('Horde_Auth')->getAuth('application', array('app' => $app)) + : $injector->getInstance('Horde_Auth')->getAuth(); /* Build the list of necessary login parameters. */ $loginparams = array( diff --git a/horde/scripts/cookie_login.php b/horde/scripts/cookie_login.php index b8cdb44de..0267509b6 100644 --- a/horde/scripts/cookie_login.php +++ b/horde/scripts/cookie_login.php @@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php'; Horde_Registry::appInit('horde', array('authentication' => 'none')); -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); // Check for COOKIE auth. if (empty($_COOKIE['user']) || diff --git a/horde/scripts/get_login.php b/horde/scripts/get_login.php index 0deb22803..cb6ededda 100644 --- a/horde/scripts/get_login.php +++ b/horde/scripts/get_login.php @@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php'; Horde_Registry::appInit('horde', array('authentication' => 'none')); -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); // Check for GET auth. if (empty($_GET['user']) || diff --git a/horde/scripts/http_login_refer.php b/horde/scripts/http_login_refer.php index f33340786..6d1f30145 100644 --- a/horde/scripts/http_login_refer.php +++ b/horde/scripts/http_login_refer.php @@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php'; Horde_Registry::appInit('horde'); -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); // Check for HTTP auth. if (empty($_SERVER['PHP_AUTH_USER']) || diff --git a/horde/services/changepassword.php b/horde/services/changepassword.php index d145c28ae..219d9d677 100644 --- a/horde/services/changepassword.php +++ b/horde/services/changepassword.php @@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php'; Horde_Registry::appInit('horde', array('nologintasks' => true)); // Make sure auth backend allows passwords to be reset. -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); if (!$auth->hasCapability('update')) { $notification->push(_("Changing your password is not supported with the current configuration. Contact your administrator."), 'horde.error'); header('Location: ' . Horde::getServiceLink('login')->add('url', Horde_Util::getFormData('url'))->setRaw(true)); diff --git a/horde/services/resetpassword.php b/horde/services/resetpassword.php index ec063eac4..b9a584075 100644 --- a/horde/services/resetpassword.php +++ b/horde/services/resetpassword.php @@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php'; Horde_Registry::appInit('horde', array('authentication' => 'none')); // Make sure auth backend allows passwords to be reset. -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); if (!$auth->hasCapability('resetpassword')) { $notification->push(_("Cannot reset password automatically, contact your administrator."), 'horde.error'); header('Location: ' . Horde::getServiceLink('login')->add('url', Horde_Util::getFormData('url'))->setRaw(true)); diff --git a/horde/services/shares/edit.php b/horde/services/shares/edit.php index 2caaa2a48..ee3787f5e 100644 --- a/horde/services/shares/edit.php +++ b/horde/services/shares/edit.php @@ -26,7 +26,7 @@ $fieldsList = array( $app = Horde_Util::getFormData('app'); $shares = $injector->getInstance('Horde_Share')->getScope($app); $groups = Horde_Group::singleton(); -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); if ($registry->hasMethod('shareHelp', $app)) { $help = $registry->callByPackage($app, 'shareHelp'); } else { diff --git a/horde/signup.php b/horde/signup.php index 21cf334fd..88b9c7d41 100644 --- a/horde/signup.php +++ b/horde/signup.php @@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/lib/Application.php'; Horde_Registry::appInit('horde', array('authentication' => 'none')); -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); // Make sure signups are enabled before proceeding if ($conf['signup']['allow'] !== true || diff --git a/imp/lib/Application.php b/imp/lib/Application.php index eb989eb59..78b74d900 100644 --- a/imp/lib/Application.php +++ b/imp/lib/Application.php @@ -359,7 +359,7 @@ class IMP_Application extends Horde_Registry_Application $params['admin_password'] = $secret->read($secret->getKey('imp'), $params['admin_password']); } - $GLOBALS['injector']->getInstance('Horde_Auth')->getOb('imap', $params)->addUser($userId, $credentials); + $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth('imap', $params)->addUser($userId, $credentials); } /** @@ -382,7 +382,7 @@ class IMP_Application extends Horde_Registry_Application $params['admin_password'] = $secret->read($secret->getKey('imp'), $params['admin_password']); } - $GLOBALS['injector']->getInstance('Horde_Auth')->getOb('imap', $params)->removeUser($userId); + $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth('imap', $params)->removeUser($userId); } /** @@ -404,7 +404,7 @@ class IMP_Application extends Horde_Registry_Application $params['admin_password'] = $secret->read($secret->getKey('imp'), $params['admin_password']); } - return $GLOBALS['injector']->getInstance('Horde_Auth')->getOb('imap', $params)->listUsers(); + return $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth('imap', $params)->listUsers(); } /* Preferences display/handling methods. Code is contained in diff --git a/ingo/scripts/ingo-postfix-policyd b/ingo/scripts/ingo-postfix-policyd index b9b7d8616..3ad30f06b 100755 --- a/ingo/scripts/ingo-postfix-policyd +++ b/ingo/scripts/ingo-postfix-policyd @@ -64,7 +64,7 @@ require_once dirname(__FILE__) . '/../../lib/Application.php'; Horde_Registry::appInit('ingo', array('authentication' => 'none', 'cli' => true)); // Initialize authentication manager. -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); // Initialize storage backend. $rules_storage = Ingo_Storage::factory(); diff --git a/koward/lib/Koward.php b/koward/lib/Koward.php index 0348dcfee..52fcefdd7 100644 --- a/koward/lib/Koward.php +++ b/koward/lib/Koward.php @@ -35,7 +35,7 @@ class Koward { $this->registry = &$registry; $this->notification = &$notification; - $this->auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $this->auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); $this->conf = Horde::loadConfiguration('conf.php', 'conf'); $this->objects = Horde::loadConfiguration('objects.php', 'objects'); diff --git a/koward/lib/Koward/Cli.php b/koward/lib/Koward/Cli.php index 74a25a745..f08990f61 100644 --- a/koward/lib/Koward/Cli.php +++ b/koward/lib/Koward/Cli.php @@ -81,7 +81,7 @@ class Koward_Cli extends Horde_Controller_Request_Base /* Authenticate the user if possible. */ if ($this->_argv->user) { - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); if (!$auth->authenticate($this->_argv->user, array('password' => $this->_argv->pass))) { throw new InvalidArgumentException('Failed to log in!'); diff --git a/koward/www/horde/config/prefs.php.dist b/koward/www/horde/config/prefs.php.dist index e1bdeec16..fc207b544 100644 --- a/koward/www/horde/config/prefs.php.dist +++ b/koward/www/horde/config/prefs.php.dist @@ -90,7 +90,7 @@ $prefGroups['authentication'] = array( ); try { - if ($GLOBALS['injector']->getInstance('Horde_Auth')->getOb()->hasCapability('update')) { + if ($GLOBALS['injector']->getInstance('Horde_Auth')->getAuth()->hasCapability('update')) { $prefGroups['forgotpass'] = array( 'column' => _("Your Information"), 'label' => _("Account Password"), diff --git a/kronolith/feed/index.php b/kronolith/feed/index.php index a7ce9fd02..f38476939 100644 --- a/kronolith/feed/index.php +++ b/kronolith/feed/index.php @@ -38,7 +38,7 @@ if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) sprintf(_("Permission denied for the requested feed (%s)."), htmlspecialchars($calendar))); } else { - $auth = $injector->getInstance('Horde_Auth')->getOb(); + $auth = $injector->getInstance('Horde_Auth')->getAuth(); if (isset($_SERVER['PHP_AUTH_USER'])) { $user = $_SERVER['PHP_AUTH_USER']; $pass = $_SERVER['PHP_AUTH_PW']; diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index f9c2391be..c5f2fbf8d 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -1595,7 +1595,7 @@ class Kronolith */ public static function readPermsForm($share) { - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); $perm = $share->getPermission(); $errors = array(); diff --git a/kronolith/perms.php b/kronolith/perms.php index 43048c282..0402251d2 100644 --- a/kronolith/perms.php +++ b/kronolith/perms.php @@ -19,7 +19,7 @@ if (!empty($conf['share']['no_sharing'])) { $shares = $GLOBALS['injector']->getInstance('Horde_Share')->getScope(); $groups = Horde_Group::singleton(); -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); $reload = false; $actionID = Horde_Util::getFormData('actionID', 'edit'); diff --git a/kronolith/templates/chunks/calendar.php b/kronolith/templates/chunks/calendar.php index ff723c3dd..bed5c2f6a 100644 --- a/kronolith/templates/chunks/calendar.php +++ b/kronolith/templates/chunks/calendar.php @@ -1,5 +1,5 @@ getInstance('Horde_Auth')->getOb(); +$auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); $horde_groups = Horde_Group::singleton(); $groups = array(); diff --git a/turba/scripts/upgrades/public_to_horde_share.php b/turba/scripts/upgrades/public_to_horde_share.php index f8886cff5..b87bcaf2b 100755 --- a/turba/scripts/upgrades/public_to_horde_share.php +++ b/turba/scripts/upgrades/public_to_horde_share.php @@ -33,7 +33,7 @@ if (!$sure) { // get the list of all users if we can. If your site // has a *large* number of users, you may want to comment // out this section to avoid unnecessary overhead. -$auth = $injector->getInstance('Horde_Auth')->getOb(); +$auth = $injector->getInstance('Horde_Auth')->getAuth(); if ($auth->hasCapability('list')) { $users = $auth->listUsers(); } diff --git a/whups/lib/Forms/Admin/User.php b/whups/lib/Forms/Admin/User.php index 98242f496..c72f119ae 100644 --- a/whups/lib/Forms/Admin/User.php +++ b/whups/lib/Forms/Admin/User.php @@ -22,7 +22,7 @@ class AddUserForm extends Horde_Form { global $conf, $whups_driver; - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); if ($auth->hasCapability('list')) { $queue = $vars->get('queue'); $current = $whups_driver->getQueueUsers($queue); diff --git a/whups/lib/Mail.php b/whups/lib/Mail.php index ad85e20d0..ff1ce4b04 100644 --- a/whups/lib/Mail.php +++ b/whups/lib/Mail.php @@ -208,7 +208,7 @@ class Whups_Mail { */ static protected function _findAuthUser($from) { - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getOb(); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); if ($auth->hasCapability('list')) { foreach ($auth->listUsers() as $user) { diff --git a/wicked/scripts/wicked.php b/wicked/scripts/wicked.php index 566aeb2d8..9e403093b 100755 --- a/wicked/scripts/wicked.php +++ b/wicked/scripts/wicked.php @@ -77,7 +77,7 @@ foreach ($opts as $opt) { // Login to horde if username & password are set. if (!empty($username) && !empty($password)) { - $auth = $injector->getInstance('Horde_Auth')->getOb(); + $auth = $injector->getInstance('Horde_Auth')->getAuth(); if (!$auth->authenticate($username, array('password' => $password))) { $error = _("Login is incorrect."); Horde::logMessage($error, 'ERR');