Fix password when the permission is not assigned

This commit is contained in:
FusionPBX 2025-02-07 17:32:09 -07:00 committed by GitHub
parent 1237b94cc4
commit a91e2ac547
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 0 deletions

View File

@ -401,6 +401,19 @@
//extension exists
}
else {
//password permission not assigned get the password from the database
if ($action == "update" && !permission_exists('extension_password')) {
$sql = "select password from v_extensions ";
$sql .= "where extension_uuid = :extension_uuid ";
$sql .= "and domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $domain_uuid;
$parameters['extension_uuid'] = $extension_uuid;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
$password = $row["password"];
}
unset($sql, $parameters, $row);
}
//get the password length and strength
$password_length = $_SESSION["extension"]["password_length"]["numeric"];