From 88315db1ebafc2e9d61711d2a114e44f2fbd7f17 Mon Sep 17 00:00:00 2001
From: Thomas Gelf <thomas@gelf.net>
Date: Mon, 9 Feb 2015 15:31:47 +0100
Subject: [PATCH] UserBackend: reasonable defaults for AD groups

I didn't do farther research, but those values seem to work fine.
---
 library/Icinga/Authentication/UserBackend.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/library/Icinga/Authentication/UserBackend.php b/library/Icinga/Authentication/UserBackend.php
index b8bde164d..cb6eb458b 100644
--- a/library/Icinga/Authentication/UserBackend.php
+++ b/library/Icinga/Authentication/UserBackend.php
@@ -93,10 +93,10 @@ abstract class UserBackend implements Countable
                 break;
             case 'msldap':
                 $groupOptions = array(
-                    'group_base_dn'             => $backendConfig->group_base_dn,
-                    'group_attribute'           => $backendConfig->group_attribute,
-                    'group_member_attribute'    => $backendConfig->group_member_attribute,
-                    'group_class'               => $backendConfig->group_class
+                    'group_base_dn'             => $backendConfig->get('group_base_dn', $resource->getDN()),
+                    'group_attribute'           => $backendConfig->get('group_attribute', 'sAMAccountName'),
+                    'group_member_attribute'    => $backendConfig->get('group_member_attribute', 'member'),
+                    'group_class'               => $backendConfig->get('group_class', 'group')
                 );
                 $backend = new LdapUserBackend(
                     $resource,