- do not clear password on editing admins when no new password is entered

Thanks for Benny Pedersen (xpunkt) to find out that this bug reappeared.
  https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1829564&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@206 a1433add-5e2c-0410-b055-b7f2511e0802
postfixadmin-2.3
Christian Boltz 17 years ago
parent 87ed834c9c
commit b594661356

@ -101,7 +101,11 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
$sqlActive = db_get_boolean(False);
}
$result = db_query ("UPDATE $table_admin SET modified=NOW(),active='$sqlActive',password='$fPassword' WHERE username='$username'");
$password_query = '';
if ($fPassword != '') { # do not change password to empty one
$password_query = ", password='$fPassword'";
}
$result = db_query ("UPDATE $table_admin SET modified=NOW(),active='$sqlActive' $password_query WHERE username='$username'");
if ($fSadmin == "on") $fSadmin = 'ALL';
@ -150,3 +154,6 @@ include ("templates/header.tpl");
include ("templates/menu.tpl");
include ("templates/admin_edit-admin.tpl");
include ("templates/footer.tpl");
/* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */
?>

Loading…
Cancel
Save