Code

Fixed problem where addressbook entries are taken in account
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 24 Nov 2005 15:06:50 +0000 (15:06 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 24 Nov 2005 15:06:50 +0000 (15:06 +0000)
for double mail address detection

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2051 594d385d-05f5-0310-b6e9-bd551577e9d8

TODO
plugins/admin/groups/class_groupMail.inc
plugins/personal/mail/class_mailAccount.inc

diff --git a/TODO b/TODO
index 0f27c63b537b1fae8508d8d11637d10795b184d1..60091e693896392edff5df5029cd972be5104673 100644 (file)
--- 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
 
 
index 395b97a4a461fc918c7d00464cb106576be98a14..b6f589befa8b4e7b98d5a732d5e38f7e63d278ef 100644 (file)
@@ -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.");
index 0de58c405e8c4c6355e3f128e64be3cefb93d92f..72c33376cf80c28d3c0c889591f5df4a40b06ee2 100644 (file)
@@ -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.");