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

This commit is contained in:
Michael Kaufmann (d00p)
2010-12-02 09:52:56 +00:00
parent ef76635508
commit 4567f7c781

View File

@@ -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']);