Skip to content

Commit 27b8b81

Browse files
committed
Fixed: FS#885 - client mail quota unlimited
1 parent 341d2b1 commit 27b8b81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interface/web/mail/mail_user_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function onSubmit() {
146146
$tmp = $app->db->queryOneRecord("SELECT sum(quota) as mailquota FROM mail_user WHERE mailuser_id != ".intval($this->id)." AND sys_groupid = $client_group_id");
147147
$mailquota = $tmp["mailquota"] / 1024 / 1024;
148148
$new_mailbox_quota = intval($this->dataRecord["quota"]);
149-
if($mailquota + $new_mailbox_quota > $client["limit_mailquota"]) {
149+
if(($mailquota + $new_mailbox_quota > $client["limit_mailquota"]) || ($new_mailbox_quota == 0 && $client["limit_mailquota"] != -1)) {
150150
$max_free_quota = $client["limit_mailquota"] - $mailquota;
151151
$app->tform->errorMessage .= $app->tform->lng("limit_mailquota_txt").": ".$max_free_quota."<br>";
152152
// Set the quota field to the max free space

0 commit comments

Comments
 (0)