edit-mailbox.php

- fix: put the values the user entered in the form again if an error was
  detected (instead of showing the form completely empty)
- fix: do not check for password length when password is not going to be 
  changed (empty password field).
  Thanks to Danilo Montagna (dmontagna) for pointing this out!
  https://sourceforge.net/forum/message.php?msg_id=4709926


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@291 a1433add-5e2c-0410-b055-b7f2511e0802
postfixadmin-2.3
Christian Boltz 17 years ago
parent 8f637b2162
commit f2c56c9203

@ -96,12 +96,12 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
if($fPassword != $user_details['password']){
$min_length = $CONF['min_password_length'];
if($fPassword == $fPassword2) {
if ($fPassword != "") {
if($min_length > 0 && strlen($fPassword) < $min_length) {
flash_error(sprintf($PALANG['pPasswordTooShort'], $CONF['min_password_length']));
$error = 1;
}
if($fPassword == $fPassword2) {
if ($fPassword != "") {
$formvars['password'] = pacrypt($fPassword);
}
}
@ -158,6 +158,13 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
exit(0);
}
}
else
{
# error detected. Put the values the user entered in the form again.
$tName = $fName;
$tQuota = $fQuota;
$tActive = $fActive;
}
}
include ("templates/header.php");

Loading…
Cancel
Save