Code

gofonaccount/gofaxaccount:
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 15 Sep 2006 07:58:54 +0000 (07:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 15 Sep 2006 07:58:54 +0000 (07:58 +0000)
Added uid to post events

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

plugins/gofax/faxaccount/class_gofaxAccount.inc
plugins/gofon/phoneaccount/class_phoneAccount.inc

index 09051c0d5c6c216e51a7c5f0d221dc9885c29440..c4cdf2a230edda6b01d83aab78a08680297b4d42 100644 (file)
@@ -43,11 +43,17 @@ class gofaxAccount extends plugin
       "goFaxPrinter", "goFaxDivertNumber", "goFaxLanguage", "goFaxFormat", "mail");
   var $objectclasses= array("goFaxAccount");
 
+  var $uid= "";
+
   function gofaxAccount ($config, $dn= NULL)
   {
     /* General initialization */
     plugin::plugin ($config, $dn);
 
+    /* Get user id */
+    if(isset($this->attrs['uid'])){
+      $this->uid = $this->attrs['uid'][0];
+    }
 
     /* Hickert : 11.11.05
      * Added to be able to handle department selection in divSelelect
@@ -624,7 +630,7 @@ class gofaxAccount extends plugin
     show_ldap_error($ldap->get_error(), _("Removing FAX account failed"));
 
     /* Optionally execute a command after we're done */
-    $this->handle_post_events('remove');
+    $this->handle_post_events('remove',array("uid"=> $this->uid));
   }
 
 
@@ -745,10 +751,10 @@ class gofaxAccount extends plugin
     /* Optionally execute a command after we're done */
     if ($this->initially_was_account == $this->is_account){
       if ($this->is_modified){
-        $this->handle_post_events("modify");
+        $this->handle_post_events("modify",array("uid" => $this->uid));
       }
     } else {
-      $this->handle_post_events("add");
+      $this->handle_post_events("add",array("uid" => $this->uid));
     }
 
   }
index d838312154e979e75fac618dd529a1e18fdcb193..44029b490f49f7897fc2512a8c8aeff9ae84d7db 100644 (file)
@@ -39,6 +39,8 @@ class phoneAccount extends plugin
       "goFonHardware","goFonPIN","goFonVoicemailPIN","telephoneNumber", "goFonMacro","macro");
   var $objectclasses= array("goFonAccount");
 
+  var $uid;
+
   function phoneAccount ($config, $dn= NULL)
   {
     plugin::plugin ($config, $dn);
@@ -967,10 +969,10 @@ class phoneAccount extends plugin
 
     if ($this->initially_was_account == $this->is_account){
       if ($this->is_modified){
-        $this->handle_post_events("modify");
+        $this->handle_post_events("modify",array("uid" => $this->uid));
       }
     } else {
-      $this->handle_post_events("add");
+      $this->handle_post_events("add",array("uid" => $this->uid));
     }
 
   }
@@ -1126,7 +1128,7 @@ class phoneAccount extends plugin
 
     /* Optionally execute a command after we're done */
     @mysql_close($r_con);
-    $this->handle_post_events('remove');
+    $this->handle_post_events('remove',array("uid"=> $this->uid));
   }