Browse code

Erlaube @schokokeks.org-IMAP

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

bernd authored on12/09/2009 08:59:54
Showing1 changed files
... ...
@@ -42,13 +42,20 @@ function change_mailaccount($id, $arr)
42 42
   if (isset($arr['account']))
43 43
   {
44 44
     list($local, $domain) = explode('@', $arr['account'], 2);
45
-    $domain = new Domain( (string) $domain);
46
-    if ($domain->id == NULL)
47
-      array_push($conditions, "domain=NULL");
45
+    if ($domain == config('masterdomain'))
46
+    {
47
+      $values['domain'] = "NULL";
48
+    }
48 49
     else
49 50
     {
50
-      $domain->ensure_userdomain();
51
-      array_push($conditions, "domain={$domain->id}");
51
+      $domain = new Domain( (string) $domain);
52
+      if ($domain->id == NULL)
53
+        array_push($conditions, "domain=NULL");
54
+      else
55
+      {
56
+        $domain->ensure_userdomain();
57
+        array_push($conditions, "domain={$domain->id}");
58
+      }
52 59
     }
53 60
     array_push($conditions, "local='".mysql_real_escape_string($local)."'");
54 61
   }