From 628760d5b9ad63ed7abefeab2d1ddd00beb4adee Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 29 May 2019 10:29:03 -0400 Subject: [PATCH] Spacing and braces cleanup from asker's code --- web/includes/actions/user.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/web/includes/actions/user.php b/web/includes/actions/user.php index 2b520cd10..bb4f24fb8 100644 --- a/web/includes/actions/user.php +++ b/web/includes/actions/user.php @@ -32,16 +32,15 @@ if ( $action == 'user' ) { $pass_hash = '"'.password_hash($pass, PASSWORD_BCRYPT).'"'; } else { $pass_hash = ' PASSWORD('.dbEscape($_REQUEST['newUser']['Password']).') '; - ZM\Info ('Cannot use bcrypt as you are using PHP < 5.5'); + ZM\Info('Cannot use bcrypt as you are using PHP < 5.5'); } if ( $_REQUEST['newUser']['Password'] ) { $changes['Password'] = 'Password = '.$pass_hash; - ZM\Info ("PASS CMD=".$changes['Password']); - } - - else + ZM\Info('PASS CMD='.$changes['Password']); + } else { unset($changes['Password']); + } if ( count($changes) ) { if ( !empty($_REQUEST['uid']) ) { @@ -69,10 +68,9 @@ if ( $action == 'user' ) { $pass_hash = ' PASSWORD('.dbEscape($_REQUEST['newUser']['Password']).') '; ZM\Info ('Cannot use bcrypt as you are using PHP < 5.3'); } - if ( !empty($_REQUEST['newUser']['Password']) ) { - ZM\Info ("PASS CMD=".$changes['Password']); + ZM\Info('PASS CMD='.$changes['Password']); $changes['Password'] = 'Password = '.$pass_hash; }