26 require_once(
"../class/config.php");
29 "mail_id" =>array (
"post",
"integer",
""),
30 "new_account" =>array (
"post",
"integer",
""),
31 "pass" => array (
"post",
"string",
""),
32 "passconf" => array(
"post",
"string",
""),
33 "quotamb" => array(
"post",
"integer",0),
34 "enabled" => array(
"post",
"boolean",
true),
35 "islocal" => array(
"post",
"boolean",
true),
36 "recipients" => array(
"post",
"string",
""),
45 include(
"mail_list.php");
53 if($pass != $passconf){
54 $msg->raise(
"ERROR",
"mail", _(
"Passwords do not match"));
55 include (
"mail_edit.php");
58 $canbeempty = ($islocal != 1 || ($islocal == 1 && !
$new_account))?
true:
false;
63 if (!$mail->set_passwd(
$mail_id,$pass,$canbeempty)) {
64 include (
"mail_edit.php");
67 }
else if (!
$new_account && empty($pass) && $islocal == 1 &&
$res[
'password'] ==
"") {
68 if (!$mail->set_passwd(
$mail_id,$pass,
false)) {
69 include (
"mail_edit.php");
79 if (
$res[
"enabled"] && !$enabled) {
81 include (
"mail_edit.php");
85 if (!
$res[
"enabled"] && $enabled) {
87 include (
"mail_edit.php");
97 include (
"mail_edit.php");
106 if (in_array(
false,$rh,
true)) {
107 include (
"mail_edit.php");
110 foreach($rh as $h)
if ($h)
$msg->raise(
"ERROR",
"mail", $h);
116 $msg->raise(
"INFO",
"mail", _(
"Your email has been created successfully"));
118 $msg->raise(
"INFO",
"mail", _(
"Your email has been edited successfully"));
121 include(
"mail_list.php");
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
$fields
edit an email account settings