Sicherstellen, dass die Domain auch dem User gehört
bernd

bernd commited on 2009-06-19 10:05:56
Zeige 1 geänderte Dateien mit 6 Einfügungen und 2 Löschungen.


git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1398 87cf0b9e-d624-0410-a070-f6ee81989793
... ...
@@ -46,8 +46,10 @@ function change_mailaccount($id, $arr)
46 46
     if ($domain->id == NULL)
47 47
       array_push($conditions, "domain=NULL");
48 48
     else
49
+    {
50
+      $domain->ensure_userdomain();
49 51
       array_push($conditions, "domain={$domain->id}");
50
-
52
+    }
51 53
     array_push($conditions, "local='".mysql_real_escape_string($local)."'");
52 54
   }
53 55
   if (isset($arr['mailbox']))
... ...
@@ -84,8 +86,10 @@ function create_mailaccount($arr)
84 86
   $domain = new Domain( (string) $domain);
85 87
   if ($domain->id == NULL)
86 88
     $values['domain'] = "NULL";
87
-  else
89
+  else {
90
+    $domain->ensure_userdomain();
88 91
     $values['domain'] = $domain->id;
92
+  }
89 93
 
90 94
   $values['local'] = "'".mysql_real_escape_string($local)."'";
91 95
 
92 96