Commit 27b8b81a authored by tbrehm's avatar tbrehm
Browse files

Fixed: FS#885 - client mail quota unlimited

parent 341d2b14
......@@ -146,7 +146,7 @@ class page_action extends tform_actions {
$tmp = $app->db->queryOneRecord("SELECT sum(quota) as mailquota FROM mail_user WHERE mailuser_id != ".intval($this->id)." AND sys_groupid = $client_group_id");
$mailquota = $tmp["mailquota"] / 1024 / 1024;
$new_mailbox_quota = intval($this->dataRecord["quota"]);
if($mailquota + $new_mailbox_quota > $client["limit_mailquota"]) {
if(($mailquota + $new_mailbox_quota > $client["limit_mailquota"]) || ($new_mailbox_quota == 0 && $client["limit_mailquota"] != -1)) {
$max_free_quota = $client["limit_mailquota"] - $mailquota;
$app->tform->errorMessage .= $app->tform->lng("limit_mailquota_txt").": ".$max_free_quota."<br>";
// Set the quota field to the max free space
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment