From 5b0ba62f549882acc5a65d11a3d96e6ea9939a1c Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 6 Mar 2020 19:44:03 -0700 Subject: [PATCH] Update user_imports.php --- core/users/user_imports.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/core/users/user_imports.php b/core/users/user_imports.php index cd1f0fc158..486457b4c2 100644 --- a/core/users/user_imports.php +++ b/core/users/user_imports.php @@ -330,16 +330,12 @@ } } - //get the password, salt and hash the user password + //set the password hash cost + $options = array('cost' => 10); + + //set the hash the user password $password = $array['users'][$row_id]['password']; - if (isset($array['users'][$row_id]['salt'])) { - $salt = $array['users'][$row_id]['salt']; - } - else { - $salt = uuid(); - $array['users'][$row_id]['salt'] = $salt; - } - $array['users'][$row_id]['password'] = md5($salt.$password); + $array['users'][$row_id]['password'] = password_hash($password, PASSWORD_DEFAULT, $options); //set the user_uuid $array['users'][$row_id]['user_uuid'] = $user_uuid; @@ -503,4 +499,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?>