From 4567f7c781ecc9d8558c020c759c217bb0863b2b Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Thu, 2 Dec 2010 09:52:56 +0000 Subject: [PATCH] only call validatePassword() when creating a customer if the password is not empty, cause otherwise no random password can be generated if field is left empty --- admin_customers.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/admin_customers.php b/admin_customers.php index 47d422c5..1782a808 100644 --- a/admin_customers.php +++ b/admin_customers.php @@ -474,7 +474,12 @@ if($page == 'customers' $createstdsubdomain = intval($_POST['createstdsubdomain']); $password = validate($_POST['new_customer_password'], 'password'); - $password = validatePassword($password); + // only check if not empty, + // cause empty == generate password automatically + if($password != '') + { + $password = validatePassword($password); + } $sendpassword = intval($_POST['sendpassword']); $phpenabled = intval($_POST['phpenabled']); $perlenabled = intval($_POST['perlenabled']);