edit-mailbox.php; indentation fix

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@272 a1433add-5e2c-0410-b055-b7f2511e0802
postfixadmin-2.3
David Goodwin 17 years ago
parent 3c2bf37f4a
commit 70dea6ca05

@ -49,10 +49,6 @@ if (isset ($_GET['domain'])) $fDomain = escape_string ($_GET['domain']);
$pEdit_mailbox_name_text = $PALANG['pEdit_mailbox_name_text'];
$pEdit_mailbox_quota_text = $PALANG['pEdit_mailbox_quota_text'];
$result = db_query("SELECT * FROM $table_mailbox WHERE username = '$fUsername' AND domain = '$fDomain'");
if($result['rows'] != 1) {
die("Invalid username chosen; user does not exist in mailbox table");
}
if (!(check_owner ($SESSID_USERNAME, $fDomain) || authentication_has_role('global-admin')) )
{
@ -63,6 +59,10 @@ if (!(check_owner ($SESSID_USERNAME, $fDomain) || authentication_has_role('globa
$tMessage = $PALANG['pEdit_mailbox_domain_error'] . "$fDomain</span>";
}
$result = db_query("SELECT * FROM $table_mailbox WHERE username = '$fUsername' AND domain = '$fDomain'");
if($result['rows'] != 1) {
die("Invalid username chosen; user does not exist in mailbox table");
}
$user_details = db_array($result['result']);
if ($_SERVER['REQUEST_METHOD'] == "GET")
@ -93,7 +93,6 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
if (isset ($_POST['fQuota'])) $fQuota = intval ($_POST['fQuota']);
if (isset ($_POST['fActive'])) $fActive = escape_string ($_POST['fActive']);
if($fPassword != $user_details['password']){
if($fPassword == $fPassword2) {
if ($fPassword != "") {
@ -144,14 +143,13 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
$formvars['active']=$sqlActive;
$result = db_update ('mailbox', "username='$fUsername' AND domain='$fDomain'", $formvars, array('modified'));
if ($result != 1) {
$tMessage = $PALANG['pEdit_mailbox_result_error'];
}
else {
db_log ($SESSID_USERNAME, $fDomain, 'edit_mailbox', $fUsername);
header ("Location: list-virtual.php?domain=$fDomain");
// header ("Location: list-virtual.php?domain=$fDomain");
exit;
}
}

Loading…
Cancel
Save