From 975eab6a87efd3ffe56fda9fa1995982e550ada1 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 6 Feb 2009 13:33:41 +0000 Subject: [PATCH] Added missing check for group mails. Closes #617 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13396 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../mail/admin/groups/mail/class_groupMail.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc index 2b259812b..ee636c8e3 100644 --- a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc +++ b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc @@ -850,6 +850,16 @@ class mailgroup extends plugin } } + /* Check if this mail address is already in use */ + $ldap->cd($this->config->current['BASE']); + $filter = "(&(!(objectClass=gosaUserTemplate))(!(cn=".$this->cn."))". + "(objectClass=gosaMailAccount)". + "(|(mail=".$mail.")(alias=".$mail.")(gosaMailAlternateAddress=".$mail.")))"; + $ldap->search($filter,array("cn")); + if ($ldap->count() != 0){ + $message[]= msgPool::duplicated(_("Mail address")); + } + /* Check rejectsize for integer */ if ($this->gosaMailMaxSize != '' && $this->acl_is_writeable("gosaMailQuota")){ if (!is_numeric($this->gosaMailMaxSize)){ -- 2.30.2