Code

added comparison for primary Addresss to forward and alternate Addresses in the FE.
authorhzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 13 Sep 2010 09:52:46 +0000 (09:52 +0000)
committerhzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 13 Sep 2010 09:52:46 +0000 (09:52 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19619 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/personal/groupware/class_groupware.inc

index 26b4d0d635ddb94b4cb3895680f83a1c6ef0f586..430e3a904b0eb9d98d3ac9b2e82899bd7d680ff9 100644 (file)
@@ -742,7 +742,12 @@ class groupware extends plugin
                if(isset($this->forwardingAddresses) && is_array($this->forwardingAddresses)){
                        foreach($this->forwardingAddresses as $fAddress){
                                if(!tests::is_email ($fAddress)){
-                                       $messages[] = msgPool::invalid(_("Mail address"),$fAddress, "", _("Example: user@excom.intranet.gonicus.de"));
+                                       $messages[] = msgPool::invalid(_("Mail address"),$fAddress, "", 
+                                               _("Example: user@excom.intranet.gonicus.de"));
+                               }
+                               if($fAddress == $this->mailAddress){
+                                       $messages[] = msgPool::invalid(_("Mail address same as primary Email Address"),$fAddress, "",
+                                                _("Forward Address and primary Email Address must not be the same (cirle reference)"));
                                }
                        }
                }
@@ -751,6 +756,10 @@ class groupware extends plugin
                                if(!tests::is_email ($fAddress)){
                                        $messages[] = msgPool::invalid(_("Mail address"),$fAddress, "", _("Example: user@excom.intranet.gonicus.de"));
                                }
+                               if($fAddress == $this->mailAddress){
+                                       $messages[] = msgPool::invalid(_("Mail address same as primary Email Address"),$fAddress, "",
+                                                _("Alternative Address and primary Email Address must not be the same (cirle reference)"));
+                               }
                        }
                }