From e627d934189afcbb4be2c6d8b85d4d3805625c8f Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 31 May 2006 11:54:32 +0000 Subject: [PATCH] Added allow_remove method for mailAccount git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3583 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/mail/class_mailAccount.inc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index 1d45d563f..b6938636f 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -949,6 +949,24 @@ class mailAccount extends plugin } } + + function allow_remove() + { + if (isset($this->config->current['MAILMETHOD'])){ + $method= $this->config->current['MAILMETHOD']; + if(preg_match("/kolab/i",$method)){ + $ldap = $this->config->get_ldap_link(); + $ldap->cd($this->config->current['BASE']); + $ldap->cat($this->dn); + if($ldap->count()){ + $attrs = $ldap->fetch(); + if((isset($attrs['kolabDeleteFlag'])) || (in_array("gosaMailAccount",$attrs['objectClass']))){ + return("Waiting for kolabd to remove mail properties"); + } + } + } + } + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: -- 2.30.2