Code

Added LDAP_FILTER_NESTING_LIMIT to baort group member resolv if member count is above...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 6 Jun 2008 09:39:47 +0000 (09:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 6 Jun 2008 09:39:47 +0000 (09:39 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11258 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/groups/class_groupGeneric.inc

index c9e3958c9ea46ba0ef4f503a367d5dc518f3a7c0..10c23d1df4e4f50b8bf78f7d7ad191207d93fbda 100644 (file)
@@ -633,11 +633,15 @@ class group extends plugin
          to be prepared when adding/deleting users)
      */    
     $filter = "";
-    foreach ($this->memberUid as $value){
-      if(!isset($this->members[$value])){
-        $filter .= "(uid=".normalizeLdap($value).")";
+    if(!isset($this->config->current['LDAP_FILTER_NESTING_LIMIT']) || 
+        count($this->memberUid) < $this->config->current['LDAP_FILTER_NESTING_LIMIT']){
+      foreach ($this->memberUid as $value){
+        if(!isset($this->members[$value])){
+          $filter .= "(uid=".normalizeLdap($value).")";
+        }
       }
     }
+
     if(!empty($filter)){    
       $ldap->cd($this->config->current['BASE']);
       $ldap->search("(&(objectClass=gosaAccount)(!(objectClass=gosaUserTemplate))(|".$filter."))",array("dn", "uid","sn","givenName"));
@@ -649,11 +653,18 @@ class group extends plugin
     }
   
     /* check if all uids are resolved */
-    foreach ($this->memberUid as $value){
-      if(!isset($this->members[$value])){
-        $this->members[$value] =  _("! unknown id")." [".$value."]"; 
-      }
-    }  
+    if(!isset($this->config->current['LDAP_FILTER_NESTING_LIMIT']) || 
+        count($this->memberUid) < $this->config->current['LDAP_FILTER_NESTING_LIMIT']){
+      foreach ($this->memberUid as $value){
+        if(!isset($this->members[$value])){
+          $this->members[$value] =  _("! unknown id")." [".$value."]"; 
+        }
+      }  
+    }else{
+      foreach ($this->memberUid as $value){
+        $this->members[$value] = $value; 
+      }  
+    }
 
     /* Create display list of users matching regex & filter 
      */