summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8de68b9)
raw | patch | inline | side by side (parent: 8de68b9)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Aug 2006 03:23:40 +0000 (03:23 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Aug 2006 03:23:40 +0000 (03:23 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4361 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_printGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 592a1a1b585242c5aa4a34e32f727bc13c60b415..ea4f24dc973798800917a3e0f062014069f9bd1f 100644 (file)
foreach($this->attrs[$attr] as $mem){
if(preg_match("/Group/",$type)){
$ldap->search("(&(objectClass=posixGroup)(cn=".$mem."))",array("cn","description"));
- $entry = $ldap->fetch();
- $this->member[$type][$entry['cn'][0]]=$entry;
+ if($ldap->count()){
+ $entry = $ldap->fetch();
+ $this->member[$type][$entry['cn'][0]]=$entry;
+ }
}else{
$ldap->search("(&(objectClass=person)(objectClass=inetOrgPerson)(uid=".$mem."))",array("cn","uid"));
- $entry = $ldap->fetch();
- if(isset($entry['uid'])){
+ if($ldap->count()){
+ $entry = $ldap->fetch();
$this->member[$type][$entry['uid'][0]]=$entry;
}
}