From: hickert Date: Mon, 26 Jul 2010 08:53:10 +0000 (+0000) Subject: Updated groupManagement X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=89fb2504f9754f7e452fc7017089db59d6a37bcd;p=gosa.git 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 --- 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]);