AdminAccountPage: Fix user backend creation

Missed to adjust this as part of 83aafe8c
This commit is contained in:
Johannes Meyer 2015-07-29 15:07:41 +02:00
parent 3f7081296b
commit 4cc95c91ef
1 changed files with 7 additions and 1 deletions

View File

@ -4,10 +4,12 @@
namespace Icinga\Module\Setup\Forms; namespace Icinga\Module\Setup\Forms;
use Exception; use Exception;
use Icinga\Application\Config;
use Icinga\Authentication\User\UserBackend; use Icinga\Authentication\User\UserBackend;
use Icinga\Authentication\User\DbUserBackend; use Icinga\Authentication\User\DbUserBackend;
use Icinga\Authentication\User\LdapUserBackend; use Icinga\Authentication\User\LdapUserBackend;
use Icinga\Data\ConfigObject; use Icinga\Data\ConfigObject;
use Icinga\Data\ResourceFactory;
use Icinga\Web\Form; use Icinga\Web\Form;
/** /**
@ -271,8 +273,12 @@ class AdminAccountPage extends Form
*/ */
protected function createBackend() protected function createBackend()
{ {
$resourceConfig = new Config();
$resourceConfig->setSection($this->resourceConfig['name'], $this->resourceConfig);
ResourceFactory::setConfig($resourceConfig);
$config = new ConfigObject($this->backendConfig); $config = new ConfigObject($this->backendConfig);
$config->resource = $this->resourceConfig; $config->resource = $this->resourceConfig['name'];
return UserBackend::create(null, $config); return UserBackend::create(null, $config);
} }
} }