schokokeks.org web services commited on 2014-04-11 17:07:22
Zeige 1 geänderte Dateien mit 6 Einfügungen und 1 Löschungen.
... | ... |
@@ -160,8 +160,13 @@ function get_mailaccount_id($accountname) |
160 | 160 |
":domain" => $domain); |
161 | 161 |
|
162 | 162 |
$result = db_query("SELECT acc.id FROM mail.mailaccounts AS acc LEFT JOIN mail.v_domains AS dom ON (dom.id=acc.domain) WHERE local=:local AND dom.domainname=:domain", $args); |
163 |
- if ($result->rowCount() != 1) |
|
163 |
+ if (($result->rowCount() == 0) && ($domain == config('masterdomain'))) { |
|
164 |
+ unset($args[':domain']); |
|
165 |
+ $result = db_query("SELECT acc.id FROM mail.mailaccounts AS acc WHERE local=:local AND acc.domain IS NULL", $args); |
|
166 |
+ } |
|
167 |
+ if ($result->rowCount() != 1) { |
|
164 | 168 |
system_failure('account nicht eindeutig'); |
169 |
+ } |
|
165 | 170 |
$acc = $result->fetch(); |
166 | 171 |
return $acc['id']; |
167 | 172 |
} |
168 | 173 |