From 4cc95c91ef87607ce6bc89a5fdf6444618926070 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 29 Jul 2015 15:07:41 +0200 Subject: [PATCH] AdminAccountPage: Fix user backend creation Missed to adjust this as part of 83aafe8c --- modules/setup/application/forms/AdminAccountPage.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/setup/application/forms/AdminAccountPage.php b/modules/setup/application/forms/AdminAccountPage.php index 191f27b8b..86d77d6e8 100644 --- a/modules/setup/application/forms/AdminAccountPage.php +++ b/modules/setup/application/forms/AdminAccountPage.php @@ -4,10 +4,12 @@ namespace Icinga\Module\Setup\Forms; use Exception; +use Icinga\Application\Config; use Icinga\Authentication\User\UserBackend; use Icinga\Authentication\User\DbUserBackend; use Icinga\Authentication\User\LdapUserBackend; use Icinga\Data\ConfigObject; +use Icinga\Data\ResourceFactory; use Icinga\Web\Form; /** @@ -271,8 +273,12 @@ class AdminAccountPage extends Form */ protected function createBackend() { + $resourceConfig = new Config(); + $resourceConfig->setSection($this->resourceConfig['name'], $this->resourceConfig); + ResourceFactory::setConfig($resourceConfig); + $config = new ConfigObject($this->backendConfig); - $config->resource = $this->resourceConfig; + $config->resource = $this->resourceConfig['name']; return UserBackend::create(null, $config); } }