Fix extension edit password length and strength.

This commit is contained in:
FusionPBX 2020-05-12 11:07:46 -06:00 committed by GitHub
parent 7fc8b79894
commit 5b1b2687b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 6 deletions

View File

@ -315,15 +315,18 @@
}
else {
//get the password length and strength
$password_length = $_SESSION["extension"]["password_length"]["numeric"];
$password_strength = $_SESSION["extension"]["password_strength"]["numeric"];
//extension does not exist add it
if ($action == "add" || $range > 1) {
$extension_uuid = uuid();
$voicemail_uuid = uuid();
$password = generate_password();
$password = generate_password($password_length, $password_strength);
}
//prepare the values
//mwi account
//prepare the values for mwi account
if (strlen($mwi_account) > 0) {
if (strpos($mwi_account, '@') === false) {
if (count($_SESSION["domains"]) > 1) {
@ -337,10 +340,10 @@
//generate a password
if ($action == "add" && strlen($password) == 0) {
$password = generate_password();
$password = generate_password($password_length, $password_strength);
}
if ($action == "update" && permission_exists('extension_password') && strlen($password) == 0) {
$password = generate_password();
$password = generate_password($password_length, $password_strength);
}
//create the data array
@ -1962,4 +1965,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>