From 89fb2504f9754f7e452fc7017089db59d6a37bcd Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 26 Jul 2010 08:53:10 +0000 Subject: [PATCH] Updated groupManagement -Ensure that new members are part of the objectCache else we got several errors. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19099 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../plugins/admin/ogroups/class_ogroup.inc | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc index 66a8d79e8..5cb4ff837 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroup.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroup.inc @@ -161,10 +161,22 @@ class ogroup extends plugin function AddDelMembership($NewMember = false){ - if($NewMember){ + if($NewMember){ + + // Ensure that we definitely know the new members attributes. + // - Fetch unknown objects here. + if(!isset($this->memberList[$NewMember])){ + + $ldap = $this->config->get_ldap_link(); + $ldap->cd($this->config->current['BASE']); + $ldap->cat($NewMember); + $attrs = $ldap->fetch(); + $this->objcache[$NewMember] = $attrs; + } + + /* Add member and force reload */ + $this->member[$NewMember]= $NewMember; - /* Add member and force reload */ - $this->member[$NewMember]= $NewMember; $this->memberList[$NewMember]= $this->objcache[$NewMember]; unset ($this->objects[$NewMember]); -- 2.30.2