From: hickert Date: Wed, 1 Jul 2009 06:29:06 +0000 (+0000) Subject: Updated mail group plugin X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0947e4d84a5b2d11a6d9dd574d5704a4c3be8846;p=gosa.git Updated mail group plugin -Preset mail attribute if mail address has to equal the objects cn git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13860 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc index f87faa424..5bdd24b24 100644 --- a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc +++ b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc @@ -46,7 +46,7 @@ class mailgroup extends plugin var $orig_cn = ""; var $show_effective_memeber = FALSE; - function __construct (&$config, $dn= NULL, $ui= NULL) + function __construct (&$config, $dn= NULL, $base_object= NULL) { plugin::plugin($config, $dn); @@ -74,6 +74,14 @@ class mailgroup extends plugin */ $this->initially_was_account = $this->is_account; + /* While we are not not allowed to modify the mail address + * and this is a new mail account, preset the user part of the + * mail address with the accounts cn. + */ + if(!$this->mailMethod->isModifyableMail() && !$this->initially_was_account){ + $this->mail = &$base_object->cn; + } + /* Load folder_acls with defaults. anyone -- The default acl, will be written to ldap. member -- The ACL used for the members.