| | |
| | | } |
| | | |
| | | // Check the quota and adjust |
| | | if($client["limit_mailquota"] >= 0) { |
| | | if(isset($_POST["quota"]) && $client["limit_mailquota"] >= 0) { |
| | | $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"]); |
| | |
| | | $app->uses('getconf'); |
| | | $mail_config = $app->getconf->get_server_config($domain["server_id"],'mail'); |
| | | $maildir = str_replace("[domain]",$domain["domain"],$mail_config["maildir_path"]); |
| | | $maildir = str_replace("[localpart]",$_POST["email_local_part"],$maildir); |
| | | $maildir = str_replace("[localpart]",strtolower($_POST["email_local_part"]),$maildir); |
| | | $this->dataRecord["maildir"] = $maildir; |
| | | $this->dataRecord["homedir"] = $mail_config["homedir_path"]; |
| | | $this->dataRecord["uid"] = $mail_config["mailuser_uid"]; |