Skip to content
Snippets Groups Projects
Commit ede489de authored by Till Brehm's avatar Till Brehm
Browse files

Fixed: FS#3534 - Check if mail quota check is working correctly

parent d678830e
No related branches found
No related tags found
No related merge requests found
......@@ -166,7 +166,7 @@ class page_action extends tform_actions {
}
// Check the quota and adjust
if(isset($_POST["quota"]) && $client["limit_mailquota"] >= 0 && $app->functions->intval($this->dataRecord["quota"]) * 1024 * 1024 != $this->oldDataRecord['quota']) {
if(isset($_POST["quota"]) && $client["limit_mailquota"] >= 0 && (($app->functions->intval($this->dataRecord["quota"]) * 1024 * 1024 != $this->oldDataRecord['quota']) || ($_POST["quota"] <= 0))) {
$tmp = $app->db->queryOneRecord("SELECT sum(quota) as mailquota FROM mail_user WHERE mailuser_id != ".$app->functions->intval($this->id)." AND ".$app->tform->getAuthSQL('u'));
$mailquota = $tmp["mailquota"] / 1024 / 1024;
$new_mailbox_quota = $app->functions->intval($this->dataRecord["quota"]);
......@@ -179,6 +179,7 @@ class page_action extends tform_actions {
unset($tmp);
unset($tmp_quota);
}
} // end if user is not admin
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment