From 979e0a80d244bc4138f465d4090fdc1ad1bec150 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 9 Mar 2006 11:06:57 +0000 Subject: [PATCH] Added fix to be able to display unknown group members git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2831 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/groups/class_groupGeneric.inc | 27 ++++++++++++--------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc index 0fcc62b1d..4e235a6c8 100644 --- a/plugins/admin/groups/class_groupGeneric.inc +++ b/plugins/admin/groups/class_groupGeneric.inc @@ -452,17 +452,22 @@ class group extends plugin $ldap->cd($this->config->current['BASE']); $ldap->search("(&(objectClass=gosaAccount)(uid=".$value."))",array("uid", "sn","givenName")); $attrs = $ldap->fetch(); - - if (isset($attrs["givenName"][0]) && isset($attrs["sn"][0])){ - $this->allusers[$attrs["uid"][0]]= $attrs["sn"][0].", ". - $attrs["givenName"][0]." [".$attrs["uid"][0]."]"; - } else { - $this->allusers[$attrs["uid"][0]]= $attrs['uid'][0]; - } - if (isset($this->allusers[$value])){ - $this->members[$value]= $this->allusers[$value]; - } else { - $this->members[$value] = "[".$value."]"; + + if(!$attrs){ + $this->members[$value] = _("! unknown id")." [".$value."]"; + }else{ + + if (isset($attrs["givenName"][0]) && isset($attrs["sn"][0])){ + $this->allusers[$attrs["uid"][0]]= $attrs["sn"][0].", ". + $attrs["givenName"][0]." [".$attrs["uid"][0]."]"; + } else { + $this->allusers[$attrs["uid"][0]]= $attrs['uid'][0]; + } + if (isset($this->allusers[$value])){ + $this->members[$value]= $this->allusers[$value]; + } else { + $this->members[$value] = "[".$value."]"; + } } } } -- 2.30.2