mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Fix extension edit password length and strength.
This commit is contained in:
@@ -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";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user