summaryrefslogtreecommitdiffstats
path: root/lib/Auth
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-08-12 13:10:07 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-08-12 13:10:07 +0200
commit93cf56fa9e0779ccfc1fc079907d914929e9ec84 (patch)
tree8902e9b65d440a50e66ca610a76f15dcc477b555 /lib/Auth
parent45ba054788f5951d8812fea6e9e4647fd7b7d114 (diff)
downloadwebadmin-93cf56fa9e0779ccfc1fc079907d914929e9ec84.tar.gz
Add parsing for a 'ou' attribute to groups as well
Diffstat (limited to 'lib/Auth')
-rw-r--r--lib/Auth/LDAP.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index 1ca5764..7763205 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -556,7 +556,13 @@ class LDAP extends Net_LDAP3 {
public function group_add($attrs, $typeid = null)
{
- $base_dn = $this->entry_base_dn('group', $typeid);
+ if (!empty($attrs['ou'])) {
+ $base_dn = $attrs['ou'];
+ unset($attrs['ou']);
+ }
+ else {
+ $base_dn = $this->entry_base_dn('group', $typeid);
+ }
// TODO: The rdn is configurable as well.
// Use [$type_str . "_"]user_rdn_attr