From f0a99274e69f83af100e95ce971c5a84f7e81115 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 11 Aug 2014 10:46:08 +0200 Subject: [PATCH] Access backend information by using getValue() instead of getConfig() refs #5525 --- .../Config/Authentication/LdapBackendForm.php | 29 ++++--------------- 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/application/forms/Config/Authentication/LdapBackendForm.php b/application/forms/Config/Authentication/LdapBackendForm.php index e5f1bac41..8e1872e86 100644 --- a/application/forms/Config/Authentication/LdapBackendForm.php +++ b/application/forms/Config/Authentication/LdapBackendForm.php @@ -113,25 +113,6 @@ class LdapBackendForm extends BaseBackendForm ); } - /** - * Return the ldap authentication backend configuration for this form - * - * @return array - * - * @see BaseBackendForm::getConfig() - */ - public function getConfig() - { - return array( - $this->getValue('name') => array( - 'backend' => 'ldap', - 'resource' => $this->getValue('resource'), - 'user_class' => $this->getValue('user_class'), - 'user_name_attribute' => $this->getValue('user_name_attribute') - ) - ); - } - /** * Validate the current configuration by connecting to a backend and requesting the user count * @@ -149,13 +130,13 @@ class LdapBackendForm extends BaseBackendForm } try { - $cfg = $this->getConfig(); - $backendConfig = new Zend_Config($cfg[$this->getValue('name')]); - $backend = ResourceFactory::createResource(ResourceFactory::getResourceConfig($backendConfig->resource)); + $backend = ResourceFactory::createResource( + ResourceFactory::getResourceConfig($this->getValue('resource')) + ); $testConn = new LdapUserBackend( $backend, - $backendConfig->user_class, - $backendConfig->user_name_attribute + $this->getValue('user_class'), + $this->getValue('user_name_attribute') ); $testConn->assertAuthenticationPossible(); } catch (Exception $exc) {