lib/Auth

Aleksander Machniak machniak at kolabsys.com
Wed Jan 23 15:31:11 CET 2013


 lib/Auth/LDAP.php |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

New commits:
commit 5da5104af689122cf4008ab36072140a0294295b
Author: Aleksander Machniak <alec at alec.pl>
Date:   Wed Jan 23 15:30:33 2013 +0100

    Fix bug where type=*e* was added to some LDAP searches

diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index bcf2176..d3116c8 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -249,18 +249,13 @@ class LDAP extends Net_LDAP3 {
 
         $mail_attrs = $this->conf->get_list('mail_attributes', array('mail', 'alias'));
 
-        $search = array(
-                'params' => array(
-                        'type' => 'exact'
-                    ),
-                'operator' => "OR"
-            );
+        $search = array('operator' => 'OR');
 
         foreach ($mail_attrs as $num => $attr) {
             $search['params'][$attr] = array(
-                        'type' => 'exact',
-                        'value' => $address,
-                );
+                'type'  => 'exact',
+                'value' => $address,
+            );
         }
 
         $result = $this->search_entries($this->config_get('root_dn'), '(objectclass=*)', 'sub', null, $search);





More information about the commits mailing list