From 665cb378738161bc931cc42d30b1614f12c3ef5f Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 24 Nov 2005 15:06:50 +0000 Subject: [PATCH] Fixed problem where addressbook entries are taken in account for double mail address detection git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2051 594d385d-05f5-0310-b6e9-bd551577e9d8 --- TODO | 3 --- plugins/admin/groups/class_groupMail.inc | 2 +- plugins/personal/mail/class_mailAccount.inc | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index 0f27c63b5..60091e693 100644 --- a/TODO +++ b/TODO @@ -3,9 +3,6 @@ Things to fix before 2.4: * Divlists are broken in firefox 1.5rc1 -* Check for double accounts (mail addresses) which are listed in the - address book, also - * Fix fai package divlist diff --git a/plugins/admin/groups/class_groupMail.inc b/plugins/admin/groups/class_groupMail.inc index 395b97a4a..b6f589bef 100644 --- a/plugins/admin/groups/class_groupMail.inc +++ b/plugins/admin/groups/class_groupMail.inc @@ -622,7 +622,7 @@ class mailgroup extends plugin $message[]= _("Please enter a valid email addres in 'Primary address' field."); } $ldap->cd($this->config->current['BASE']); - $ldap->search ("(&(!(objectClass=gosaUserTemplate))(|(mail=".$this->mail.")(gosaMailAlternateAddress=". + $ldap->search ("(&(!(objectClass=gosaUserTemplate))(objectClass=gosaMailAccount)(|(mail=".$this->mail.")(gosaMailAlternateAddress=". $this->mail."))(!(uid=".$this->cn."))(!(cn=".$this->cn.")))"); if ($ldap->count() != 0){ $message[]= _("The primary address you've entered is already in use."); diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index 0de58c405..72c33376c 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -714,7 +714,7 @@ class mailAccount extends plugin } } $ldap->cd($this->config->current['BASE']); - $ldap->search ("(&(!(objectClass=gosaUserTemplate))(|(mail=".$this->mail.")(gosaMailAlternateAddress=". + $ldap->search ("(&(!(objectClass=gosaUserTemplate))(objectClass=gosaMailAccount)(|(mail=".$this->mail.")(gosaMailAlternateAddress=". $this->mail."))(!(uid=".$this->uid."))(!(cn=".$this->uid.")))", array("uid")); if ($ldap->count() != 0){ $message[]= _("The primary address you've entered is already in use."); -- 2.30.2