From: hickert Date: Mon, 24 Oct 2005 08:44:03 +0000 (+0000) Subject: Added (!(uid=*$)) to searchfilter X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=df1f0e6f75c82d11eb7be2e7f03bc3266aebcb2c;p=gosa.git Added (!(uid=*$)) to searchfilter git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1668 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/addons/addressbook/class_addressbook.inc b/plugins/addons/addressbook/class_addressbook.inc index 6a964bfdc..082e828c2 100644 --- a/plugins/addons/addressbook/class_addressbook.inc +++ b/plugins/addons/addressbook/class_addressbook.inc @@ -315,11 +315,11 @@ class addressbook extends plugin foreach ($bases as $base){ $ldap->cd ($base); if ($phonefilter['object_type'] == '*'){ - $ldap->search ("(&(objectClass=person)$filter(!(objectClass=gosaUserTemplate))". + $ldap->search ("(&(objectClass=person)$filter(!(objectClass=gosaUserTemplate))(!(uid=*$))". "(|(uid=$s)(homePhone=$s)(telephoneNumber=$s)". "(facsimileTelephoneNumber=$s)(mobile=$s)(givenName=$s)(sn=$s)))", array("sn", "givenName", "telephoneNumber", "facsimileTelephoneNumber", "mobile", "homePhone", "uid", "mail", "cn")); } else { - $ldap->search ("(&$filter(!(objectClass=gosaUserTemplate))". + $ldap->search ("(&$filter(!(uid=*$))(!(objectClass=gosaUserTemplate))". "(".$phonefilter['object_type']."=$s))", array("sn", "givenName", "telephoneNumber", "facsimileTelephoneNumber", "mobile", "homePhone", "uid", "mail", "cn")); }