- LSaddon::Posix : Optimisation des recherches pour le calcul des
authorBenjamin Renard <brenard@easter-eggs.com>
Tue, 7 Apr 2009 17:03:13 +0000 (17:03 +0000)
committerBenjamin Renard <brenard@easter-eggs.com>
Tue, 7 Apr 2009 17:03:13 +0000 (17:03 +0000)
uidNumber et des gidNumber

trunk/includes/addons/LSaddons.posix.php

index ab44e5b..25f1aea 100644 (file)
@@ -90,7 +90,15 @@ LSerror :: defineError('POSIX_01',
   */
   function generate_uidNumber($ldapObject) {
 
-    $objects = LSldap :: search (LS_POSIX_UIDNUMBER_ATTR.'=*');
+    $objects = LSldap :: search (
+      LS_POSIX_UIDNUMBER_ATTR.'=*',
+      NULL,
+      array(
+        'attributes' => array(
+          LS_POSIX_UIDNUMBER_ATTR
+        )
+      )
+    );
     $uidNumber = LS_POSIX_UIDNUMBER_MIN_VAL;
 
     if (!is_array($objects))
@@ -117,7 +125,15 @@ LSerror :: defineError('POSIX_01',
   */
   function generate_gidNumber($ldapObject) {
 
-    $objects = LSldap :: search (LS_POSIX_GIDNUMBER_ATTR.'=*');
+    $objects = LSldap :: search (
+      LS_POSIX_GIDNUMBER_ATTR.'=*',
+      NULL,
+      array(
+        'attributes' => array(
+          LS_POSIX_GIDNUMBER_ATTR
+        )
+      )
+    );
     $gidNumber = LS_POSIX_GIDNUMBER_MIN_VAL;
 
     if (!is_array($objects))