From 7db62e3a6e997f76aa408fd278c037dafeb3805f Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 15 Nov 2006 04:01:51 +0000 Subject: [PATCH] Fixed problem with moving groups that have a mail account. "Mail address already in use" git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5112 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/groups/class_groupMail.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/admin/groups/class_groupMail.inc b/plugins/admin/groups/class_groupMail.inc index fd9df5eec..2dbc991a1 100644 --- a/plugins/admin/groups/class_groupMail.inc +++ b/plugins/admin/groups/class_groupMail.inc @@ -9,6 +9,7 @@ class mailgroup extends plugin var $uid = ""; // User id var $cn = ""; // cn + var $orig_cn = ""; // cn var $method = "mailMethod"; // Used Mail method var $mmethod = ""; // Contains the gosa.conf MAILMETHOD @@ -47,6 +48,9 @@ class mailgroup extends plugin var $indexed_acl= array(); var $indexed_user= array(); + /* Copy & paste */ + var $CopyPasteVars = array("quotaUsage"); + /* attribute list for save action */ var $attributes= array( "mail", "gosaMailServer", "gosaMailQuota", "gosaMailMaxSize", "gosaMailAlternateAddress", "gosaMailForwardingAddress", @@ -62,6 +66,9 @@ class mailgroup extends plugin */ plugin::plugin($config, $dn, $parent); + /* Save initial cn */ + $this->orig_cn = $this->cn; + /* Set mailMethod to the one defined in gosa.conf */ if (isset($this->config->current['MAILMETHOD'])){ @@ -836,7 +843,7 @@ I: Only insider delivery */ } $ldap->cd($this->config->current['BASE']); $ldap->search ("(&(!(objectClass=gosaUserTemplate))(objectClass=gosaMailAccount)(|(mail=".$this->mail.")(gosaMailAlternateAddress=". - $this->mail."))(!(uid=".$this->cn."))(!(cn=".$this->cn.")))"); + $this->mail."))(!(uid=".$this->orig_cn."))(!(cn=".$this->orig_cn.")))"); if ($ldap->count() != 0){ $message[]= _("The primary address you've entered is already in use."); } -- 2.30.2