Permalink
Browse files

Now excluding computers from the search results.

  • Loading branch information...
1 parent 00b6ffd commit 64d53239698f89f014d2b23b6c3c48a63fba486c @adamfranco adamfranco committed Aug 31, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 actions/search.php
View
@@ -28,7 +28,7 @@
$limit = 20;
}
-$results = $ldap->search('(ANR='.$q.')', $ldapConfig['BaseDN'], array('givenName', 'sn', 'cn', 'mail', 'objectClass'), $limit);
+$results = $ldap->search('(&(ANR='.$q.')(objectClass=User)(!(objectClass=Computer)))', $ldapConfig['BaseDN'], array('givenName', 'sn', 'cn', 'mail', 'objectClass'), $limit);
foreach ($results as $entry) {
if (in_array('group', $entry['objectclass'])) {
$levels = ldap_explode_dn($entry['dn'], 1);

0 comments on commit 64d5323

Please sign in to comment.