From 735279ec157b055a54fa996fdbe289c483f74be1 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 10 Jan 2007 08:12:59 +0000 Subject: [PATCH] Fixed some error msgs git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5508 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofon/phoneaccount/class_phoneAccount.inc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc index 7b1d6517b..edd033610 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -66,6 +66,13 @@ class phoneAccount extends plugin } } + /* Set uid */ + if((isset($this->parent->by_object['user']->uid))&&(!empty($this->parent->by_object['user']->uid))){ + $this->uid = $this->parent->by_object['user']->uid; + } + if((isset($this->parent->by_object['user']->cn))&&(!empty($this->parent->by_object['user']->cn))){ + $this->cn = $this->parent->by_object['user']->cn; + } /* Check server configurations * Load all server configuration in $this->goFonHomeServers if available @@ -1320,14 +1327,14 @@ class phoneAccount extends plugin $ldap= $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); - $ldap->search("(objectClass=goFonQueue)", array("member")); + $ldap->search("(&(objectClass=goFonQueue)(member=*))", array("member")); while($attr = $ldap->fetch()){ if(in_array($this->dn,$attr['member'])){ $new =new ogrouptabs($this->config, $this->config->data['TABS']['OGROUPTABS'],$attr['dn']); unset($new->by_object['ogroup']->memberList[$this->dn]); unset($new->by_object['ogroup']->member[$this->dn]); $new->save(); - print_red(sprintf(_("Removed user '%s' from phone queue '%s'."),$this->uid,$new->by_object['ogroup']->attrs['cn'])); + print_red(sprintf(_("Removed user '%s' from phone queue '%s'."),$this->uid,$new->by_object['ogroup']->cn)); } } $ldap->cd($this->dn); -- 2.30.2