summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-07-30 10:34:55 (GMT)
committerAleksander Machniak <alec@alec.pl>2013-07-30 10:34:55 (GMT)
commit4ba996a4a12e73eb4d3708e3633e2b6702e49885 (patch)
tree7311a4e07638272fbf95031da690d4d2a577253f
parent9c8205826fd4635f48de7f3f60fffcf4b5b8d08f (diff)
downloadNet_LDAP3-4ba996a4a12e73eb4d3708e3633e2b6702e49885.tar.gz
Fix search operators
-rw-r--r--lib/Net/LDAP3.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php
index 0dc2961..a2b3e90 100644
--- a/lib/Net/LDAP3.php
+++ b/lib/Net/LDAP3.php
@@ -1525,7 +1525,7 @@ class Net_LDAP3
return null;
}
- $operators = array('=', '>', '<', '>=', '<=');
+ $operators = array('=', '~=', '>=', '<=');
$filter = '';
foreach ((array) $search['params'] as $field => $param) {
@@ -1534,19 +1534,27 @@ class Net_LDAP3
$prefix = '';
$suffix = '*';
break;
+
case 'suffix':
$prefix = '*';
$suffix = '';
break;
+
case 'exact':
case '=':
- case '>':
- case '<':
+ case '~=':
case '>=':
case '<=':
$prefix = '';
$suffix = '';
break;
+
+ case 'exists':
+ $prefix = '*';
+ $suffix = '';
+ $param['value'] = '';
+ break;
+
case 'both':
default:
$prefix = '*';