Code

Updated userRDN migrate
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 12 May 2010 13:13:59 +0000 (13:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 12 May 2010 13:13:59 +0000 (13:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18379 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_migrate_userRDN.inc

index 8fc163aac671a73ef9bd95a163bc5e2fc3c4ec05..169039784fe5961e791ea496f6c2d42744220891 100644 (file)
@@ -27,9 +27,13 @@ class migrate_userRDN implements propertyMigration
         $targetValue = $this->property->getValue(TRUE);
         $dnMatch = "";
         if(!empty($initialValue)){
-            list($namingAttrs, $container) = preg_split("/=/",$initialValue,2);
-            $container = trim($container,', ');
-            $dnMatch = "({$namingAttrs}:dn:={$container})";
+
+            foreach(preg_split("/,/", $initialValue) as $rdnPart){
+                if(empty($rdnPart)) continue;
+                list($namingAttrs, $container) = preg_split("/=/",$rdnPart,2);
+                $container = trim($container,', ');
+                $dnMatch.= "({$namingAttrs}:dn:={$container})";
+            }
         }
 
         // Search for users