fix saving user using password_hash

pull/2627/head
Isaac Connor 2019-05-30 09:58:54 -04:00
parent 628760d5b9
commit ba96f0709c
1 changed files with 2 additions and 2 deletions

View File

@ -28,8 +28,8 @@ if ( $action == 'user' ) {
$types = array();
$changes = getFormChanges($dbUser, $_REQUEST['newUser'], $types);
if (function_exists ('password_hash')) {
$pass_hash = '"'.password_hash($pass, PASSWORD_BCRYPT).'"';
if ( function_exists('password_hash') ) {
$pass_hash = '"'.password_hash($_REQUEST['newUser']['Password'], PASSWORD_BCRYPT).'"';
} else {
$pass_hash = ' PASSWORD('.dbEscape($_REQUEST['newUser']['Password']).') ';
ZM\Info('Cannot use bcrypt as you are using PHP < 5.5');