Browse code

Erlaube wieder @schokokeks.org für Mailaccounts

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1464 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on10/09/2009 06:56:05
Showing1 changed files
... ...
@@ -83,12 +83,19 @@ function create_mailaccount($arr)
83 83
   $values['uid'] = (int) $_SESSION['userinfo']['uid'];
84 84
 
85 85
   list($local, $domain) = explode('@', $arr['account'], 2);
86
-  $domain = new Domain( (string) $domain);
87
-  if ($domain->id == NULL)
86
+  if ($domain == config('masterdomain'))
87
+  {
88 88
     $values['domain'] = "NULL";
89
-  else {
90
-    $domain->ensure_userdomain();
91
-    $values['domain'] = $domain->id;
89
+  }
90
+  else
91
+  {
92
+    $domain = new Domain( (string) $domain);
93
+    if ($domain->id == NULL)
94
+      $values['domain'] = "NULL";
95
+    else {
96
+      $domain->ensure_userdomain();
97
+      $values['domain'] = $domain->id;
98
+    }
92 99
   }
93 100
 
94 101
   $values['local'] = "'".mysql_real_escape_string($local)."'";