Code

Skip add if user/group is not set
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 23 Jan 2007 08:25:07 +0000 (08:25 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 23 Jan 2007 08:25:07 +0000 (08:25 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5590 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/addons/notifications/class_msgplug.inc

index 3aea28353e18fb666456ba00cad0533abe8c188d..0b86b1f7bb4eb74f16af632ca2bee5e6cd574077 100644 (file)
@@ -121,10 +121,14 @@ class msgplug extends plugin
     if (isset($_POST['add']) && isset($_POST['source']) && $this->acl_is_writeable("notify")){
       foreach ($_POST['source'] as $key){
         if ($this->target == 'user'){
-          $this->recipients[$key]= $this->users[$key];
+          if(isset($this->users[$key])){
+            $this->recipients[$key]= $this->users[$key];
+          }
         }
         if ($this->target == 'group'){
-          $this->recipients[$key]= $this->groups[$key];
+          if(isset($this->groups[$key])){
+            $this->recipients[$key]= $this->groups[$key];
+          }
         }
       }
       ksort($this->recipients);