Update user_edit.php

This commit is contained in:
FusionPBX
2020-03-06 19:37:36 -07:00
committed by GitHub
parent 3774fa95fe
commit ef8521a2ee

View File

@@ -469,6 +469,9 @@
}
}
//set the password hash cost
$options = array('cost' => 10);
//add user setting to array for update
$array['users'][$x]['user_uuid'] = $user_uuid;
$array['users'][$x]['domain_uuid'] = $domain_uuid;
@@ -476,9 +479,8 @@
$array['users'][$x]['username'] = $username;
}
if ($password != '' && $password == $password_confirm) {
$salt = uuid();
$array['users'][$x]['password'] = md5($salt.$password);
$array['users'][$x]['salt'] = $salt;
$array['users'][$x]['password'] = password_hash($password, PASSWORD_DEFAULT, $options);
$array['users'][$x]['salt'] = null;
}
$array['users'][$x]['user_email'] = $user_email;
$array['users'][$x]['user_status'] = $user_status;
@@ -1075,4 +1077,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>