Code

Updated user selection
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 22 Jan 2010 09:40:54 +0000 (09:40 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 22 Jan 2010 09:40:54 +0000 (09:40 +0000)
-We are now able again to add users to events

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15248 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/addons/goto/events/class_EventAddUserDialog.inc
gosa-plugins/goto/addons/goto/events/eventTargetUser-filter.xml

index 0a17e032cdfbc5eeff8c041884f07b1f018f9401..a93a7230f6dce630e68fa0e297053ed1c7052b1c 100644 (file)
@@ -66,7 +66,16 @@ class EventAddUserDialog extends management
   function get_selected_targets()
   {
     $entries = $this->save();
-    return($entries);
+    $a_targets = array("USERS" => array(),"GROUPS" => array());
+    foreach($entries as $entry){
+      if(in_array("posixGroup",$entry['objectClass'])){
+        $a_targets['GROUPS'][] = $entry['cn'][0];
+      }
+      if(in_array("gosaAccount",$entry['objectClass'])){
+        $a_targets['USERS'][] = $entry['uid'][0];
+      }
+    }
+    return($a_targets);
   }
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index e08a9d1e7bef682ba1ec8b45412a9f89a92b5022..9267e214471d6f188b9b2fc32b5d62f53160a1aa 100644 (file)
@@ -14,6 +14,7 @@
       <attribute>dn</attribute>
       <attribute>objectClass</attribute>
       <attribute>cn</attribute>
+      <attribute>uid</attribute>
       <attribute>description</attribute>
     </query>
     <scope>auto</scope>