From ea09927363dcbd08d39911e4f40b1e7fc7b192f3 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 15 Sep 2006 07:41:25 +0000 Subject: [PATCH] Added uid to post_events. Added uid to class member variables git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4681 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../connectivity/class_intranetAccount.inc | 11 +++++++++-- .../personal/connectivity/class_kolabAccount.inc | 14 ++++++++++---- .../personal/connectivity/class_opengwAccount.inc | 6 ++++++ .../connectivity/class_oxchangeAccount.inc | 7 +++++++ .../personal/connectivity/class_phpgwAccount.inc | 14 +++++++++++--- .../connectivity/class_phpscheduleitAccount.inc | 6 +++--- .../personal/connectivity/class_pptpAccount.inc | 14 +++++++++++--- .../personal/connectivity/class_proxyAccount.inc | 14 +++++++++++--- .../connectivity/class_pureftpdAccount.inc | 14 +++++++++++--- .../personal/connectivity/class_webdavAccount.inc | 14 +++++++++++--- 10 files changed, 90 insertions(+), 24 deletions(-) diff --git a/plugins/personal/connectivity/class_intranetAccount.inc b/plugins/personal/connectivity/class_intranetAccount.inc index d891007ed..325894392 100644 --- a/plugins/personal/connectivity/class_intranetAccount.inc +++ b/plugins/personal/connectivity/class_intranetAccount.inc @@ -27,6 +27,8 @@ class intranetAccount extends plugin /* ObjectClasses list for save action */ var $objectclasses= array("gosaIntranetAccount"); + var $uid =""; + /*! \brief Konstructor \param $config The Config Object used to initialise plugin @@ -38,6 +40,11 @@ class intranetAccount extends plugin function intranetAccount ($config, $dn= NULL) { plugin::plugin ($config, $dn); + + /* Setting uid to default */ + if(isset($this->attrs['uid'][0])){ + $this->uid = $this->attrs['uid'][0]; + } } /*! @@ -102,7 +109,7 @@ class intranetAccount extends plugin show_ldap_error($ldap->get_error(), _("Removing intranet account failed")); /* Optionally execute a command after we're done */ - $this->postremove(); + $this->postremove(array("uid"=>$this->uid)); } } @@ -157,7 +164,7 @@ class intranetAccount extends plugin show_ldap_error($ldap->get_error(), _("Saving intranet account failed")); /* Optionally execute a command after we're done */ - $this->postcreate(); + $this->postcreate(array("uid"=> $this->uid)); } } diff --git a/plugins/personal/connectivity/class_kolabAccount.inc b/plugins/personal/connectivity/class_kolabAccount.inc index 0c3a3a00f..34a8fd56c 100644 --- a/plugins/personal/connectivity/class_kolabAccount.inc +++ b/plugins/personal/connectivity/class_kolabAccount.inc @@ -24,11 +24,17 @@ class kolabAccount extends plugin /* Helper */ var $imapping= array(); + var $uid =""; function kolabAccount ($config, $dn= NULL) { plugin::plugin ($config, $dn); - + + /* Setting uid to default */ + if(isset($this->attrs['uid'][0])){ + $this->uid = $this->attrs['uid'][0]; + } + /* Pull arrays */ foreach(array("kolabDelegate", "kolabInvitationPolicy") as $attr){ if (isset($this->attrs["$attr"]["count"])){ @@ -263,7 +269,7 @@ class kolabAccount extends plugin $ldap->cd ($this->dn); $ldap->modify($this->attrs); - $this->handle_post_events('remove'); + $this->handle_post_events('remove',array("uid" => $this->uid)); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/kolab account with dn '%s' failed."),$this->dn)); } @@ -386,10 +392,10 @@ class kolabAccount 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)); } } diff --git a/plugins/personal/connectivity/class_opengwAccount.inc b/plugins/personal/connectivity/class_opengwAccount.inc index 02b075d56..a4b817d19 100644 --- a/plugins/personal/connectivity/class_opengwAccount.inc +++ b/plugins/personal/connectivity/class_opengwAccount.inc @@ -36,11 +36,17 @@ class opengwAccount extends plugin var $is_account = false; var $initialy_was_account = false; var $OGWPassword = ""; + var $uid =""; function opengwAccount ($config, $dn= NULL) { plugin::plugin ($config, $dn); + /* Setting uid to default */ + if(isset($this->attrs['uid'][0])){ + $this->uid = $this->attrs['uid'][0]; + } + $this->info=array(); /* is no account and was no account */ diff --git a/plugins/personal/connectivity/class_oxchangeAccount.inc b/plugins/personal/connectivity/class_oxchangeAccount.inc index 6104d2574..482a28c5d 100644 --- a/plugins/personal/connectivity/class_oxchangeAccount.inc +++ b/plugins/personal/connectivity/class_oxchangeAccount.inc @@ -39,6 +39,8 @@ class oxchangeAccount extends plugin var $attributes= array("OXAppointmentDays", "OXTaskDays", "OXTimeZone","mailEnabled"); var $objectclasses= array("OXUserObject"); + var $uid = ""; + var $oxconf = array(); var $timezones=array( "Africa/Abidjan", @@ -592,6 +594,11 @@ class oxchangeAccount extends plugin } } + /* Setting uid to default */ + if(isset($this->attrs['uid'][0])){ + $this->uid = $this->attrs['uid'][0]; + } + $this->dnmode= $this->config->current['DNMODE']; } diff --git a/plugins/personal/connectivity/class_phpgwAccount.inc b/plugins/personal/connectivity/class_phpgwAccount.inc index 0b1ed268b..d9d52b388 100644 --- a/plugins/personal/connectivity/class_phpgwAccount.inc +++ b/plugins/personal/connectivity/class_phpgwAccount.inc @@ -19,9 +19,17 @@ class phpgwAccount extends plugin var $attributes= array("phpgwAccountExpires", "phpgwAccountStatus", "phpgwAccountType"); var $objectclasses= array("phpgwAccount"); + var $uid = ""; + function phpgwAccount ($config, $dn= NULL) { plugin::plugin ($config, $dn); + + /* Setting uid to default */ + if(isset($this->attrs['uid'][0])){ + $this->uid = $this->attrs['uid'][0]; + } + } function execute() @@ -72,7 +80,7 @@ class phpgwAccount extends plugin show_ldap_error($ldap->get_error(), _("Removing PHPgw account failed")); /* Optionally execute a command after we're done */ - $this->handle_post_events('remove'); + $this->handle_post_events('remove',array("uid" => $this->uid)); } } @@ -117,10 +125,10 @@ class phpgwAccount 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)); } } } diff --git a/plugins/personal/connectivity/class_phpscheduleitAccount.inc b/plugins/personal/connectivity/class_phpscheduleitAccount.inc index 845b8df2c..8a3868a85 100644 --- a/plugins/personal/connectivity/class_phpscheduleitAccount.inc +++ b/plugins/personal/connectivity/class_phpscheduleitAccount.inc @@ -83,7 +83,7 @@ class phpscheduleitAccount extends plugin show_ldap_error($ldap->get_error(), _("Removing PHPscheduleit account failed")); /* Optionally execute a command after we're done */ - $this->handle_post_events('remove'); + $this->handle_post_events('remove',array("uid" => $this->uid)); } @@ -126,10 +126,10 @@ class phpscheduleitAccount 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)); } } diff --git a/plugins/personal/connectivity/class_pptpAccount.inc b/plugins/personal/connectivity/class_pptpAccount.inc index 02418d9ff..85b1e6f6c 100644 --- a/plugins/personal/connectivity/class_pptpAccount.inc +++ b/plugins/personal/connectivity/class_pptpAccount.inc @@ -35,9 +35,17 @@ class pptpAccount extends plugin var $attributes= array(); var $objectclasses= array("pptpServerAccount"); + var $uid =""; + function pptpAccount ($config, $dn= NULL) { plugin::plugin ($config, $dn); + + /* Setting uid to default */ + if(isset($this->attrs['uid'][0])){ + $this->uid = $this->attrs['uid'][0]; + } + } function execute() @@ -84,7 +92,7 @@ class pptpAccount extends plugin show_ldap_error($ldap->get_error(), _("Removing PPTP account failed")); /* Optionally execute a command after we're done */ - $this->handle_post_events('remove'); + $this->handle_post_events('remove',array("uid" => $this->uid)); } } @@ -129,10 +137,10 @@ class pptpAccount 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)); } } } diff --git a/plugins/personal/connectivity/class_proxyAccount.inc b/plugins/personal/connectivity/class_proxyAccount.inc index 267e36b02..1f6fefff7 100644 --- a/plugins/personal/connectivity/class_proxyAccount.inc +++ b/plugins/personal/connectivity/class_proxyAccount.inc @@ -23,9 +23,17 @@ class proxyAccount extends plugin "gosaProxyWorkingStop", "gosaProxyQuota", "gosaProxyQuotaPeriod"); var $objectclasses= array("gosaProxyAccount"); + var $uid = ""; + function proxyAccount ($config, $dn= NULL) { plugin::plugin ($config, $dn); + + /* Setting uid to default */ + if(isset($this->attrs['uid'][0])){ + $this->uid = $this->attrs['uid'][0]; + } + } function execute() @@ -156,7 +164,7 @@ class proxyAccount extends plugin show_ldap_error($ldap->get_error(), _("Removing proxy account failed")); /* Optionally execute a command after we're done */ - $this->handle_post_events("remove"); + $this->handle_post_events("remove",array("uid" => $this->uid)); } /* Check values */ @@ -264,10 +272,10 @@ class proxyAccount 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)); } } diff --git a/plugins/personal/connectivity/class_pureftpdAccount.inc b/plugins/personal/connectivity/class_pureftpdAccount.inc index 6103460aa..549bbf56c 100644 --- a/plugins/personal/connectivity/class_pureftpdAccount.inc +++ b/plugins/personal/connectivity/class_pureftpdAccount.inc @@ -22,6 +22,8 @@ class pureftpdAccount extends plugin var $FTPuid = ""; var $FTPgid = ""; + var $uid = ""; + /* attribute list for save action */ var $attributes= array("FTPQuotaFiles","FTPQuotaMBytes","FTPUploadRatio","FTPDownloadRatio", "FTPUploadBandwidth","FTPDownloadBandwidth","FTPStatus","FTPuid","FTPgid"); @@ -30,6 +32,12 @@ class pureftpdAccount extends plugin function pureftpdAccount ($config, $dn= NULL) { plugin::plugin ($config, $dn); + + /* Setting uid to default */ + if(isset($this->attrs['uid'][0])){ + $this->uid = $this->attrs['uid'][0]; + } + } function execute() @@ -96,7 +104,7 @@ class pureftpdAccount extends plugin show_ldap_error($ldap->get_error(), _("Removing pureftpd account failed")); /* Optionally execute a command after we're done */ - $this->handle_post_events('remove'); + $this->handle_post_events('remove',array("uid" => $this->uid)); } @@ -177,10 +185,10 @@ class pureftpdAccount 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)); } } diff --git a/plugins/personal/connectivity/class_webdavAccount.inc b/plugins/personal/connectivity/class_webdavAccount.inc index 78aaab6fd..c87b4d9de 100644 --- a/plugins/personal/connectivity/class_webdavAccount.inc +++ b/plugins/personal/connectivity/class_webdavAccount.inc @@ -15,9 +15,17 @@ class webdavAccount extends plugin var $attributes= array(); var $objectclasses= array("gosaWebdavAccount"); + var $uid =""; + function webdavAccount ($config, $dn= NULL) { plugin::plugin ($config, $dn); + + /* Setting uid to default */ + if(isset($this->attrs['uid'][0])){ + $this->uid = $this->attrs['uid'][0]; + } + } function execute() @@ -68,7 +76,7 @@ class webdavAccount extends plugin show_ldap_error($ldap->get_error(), _("Removing webDAV account failed")); /* Optionally execute a command after we're done */ - $this->handle_post_events('remove'); + $this->handle_post_events('remove',array("uid" => $this->uid)); } } @@ -113,10 +121,10 @@ class webdavAccount 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)); } } } -- 2.30.2