Bernd Wurst commited on 2013-06-11 15:39:33
Zeige 1 geänderte Dateien mit 7 Einfügungen und 1 Löschungen.
| ... | ... |
@@ -269,9 +269,10 @@ function save_vmail_account($account) |
| 269 | 269 |
$password = "'".encrypt_mail_password($account['password'])."'"; |
| 270 | 270 |
} |
| 271 | 271 |
$set_password = ($id == NULL || $password != 'NULL'); |
| 272 |
- if ($account['password'] === NULL) |
|
| 272 |
+ if ($account['password'] === NULL) {
|
|
| 273 | 273 |
$set_password=true; |
| 274 | 274 |
} |
| 275 |
+ } |
|
| 275 | 276 |
|
| 276 | 277 |
$spam = 'NULL'; |
| 277 | 278 |
switch ($account['spamfilter']) |
| ... | ... |
@@ -407,6 +408,11 @@ Wussten Sie schon, dass Sie auf mehrere Arten Ihre E-Mails abrufen können? |
| 407 | 408 |
#mail('vmail@'.config('vmail_server'), 'command', "user={$account['local']}\nhost={$domainname}", "X-schokokeks-org-message: command");
|
| 408 | 409 |
} |
| 409 | 410 |
|
| 411 |
+ // Clean up obsolete quota |
|
| 412 |
+ if ($_SESSION['role'] == ROLE_SYSTEMUSER) {
|
|
| 413 |
+ db_query("UPDATE mail.vmail_accounts SET quota_used=NULL, quota=NULL WHERE password IS NULL");
|
|
| 414 |
+ } |
|
| 415 |
+ |
|
| 410 | 416 |
// Update Mail-Quota-Cache |
| 411 | 417 |
if ($_SESSION['role'] == ROLE_SYSTEMUSER) {
|
| 412 | 418 |
$uid = (int) $_SESSION['userinfo']['uid']; |
| 413 | 419 |