Cleaned up code formatting from upload

This commit is contained in:
hifihedgehog 2019-07-25 16:52:26 -04:00 committed by GitHub
parent fe197ab440
commit 36059e960d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,25 +105,25 @@ class ChangePasswordCyberPanel implements \RainLoop\Providers\ChangePassword\Cha
$password_check_query = "SELECT * FROM e_users WHERE emailOwner_id = '$sEmailDomain' AND email = '$sEmail'"; $password_check_query = "SELECT * FROM e_users WHERE emailOwner_id = '$sEmailDomain' AND email = '$sEmail'";
$result = mysqli_query($db, $password_check_query); $result = mysqli_query($db, $password_check_query);
$password_check = mysqli_fetch_assoc($result); $password_check = mysqli_fetch_assoc($result);
if (password_verify($sPrevPassword, substr($password_check['password'], 7))) { if (password_verify($sPrevPassword, substr($password_check['password'], 7))) {
$hashed_password = '{CRYPT}'.password_hash($sNewPassword, PASSWORD_BCRYPT); $hashed_password = '{CRYPT}'.password_hash($sNewPassword, PASSWORD_BCRYPT);
$password_update_query = "UPDATE e_users SET password = '$hashed_password' WHERE emailOwner_id = '$sEmailDomain' AND email = '$sEmail'"; $password_update_query = "UPDATE e_users SET password = '$hashed_password' WHERE emailOwner_id = '$sEmailDomain' AND email = '$sEmail'";
mysqli_query($db, $password_update_query); mysqli_query($db, $password_update_query);
$bResult = true; $bResult = true;
if ($this->oLogger) if ($this->oLogger)
{ {
$this->oLogger->Write('Success! Password was changed.'); $this->oLogger->Write('Success! Password was changed.');
} }
} else { } else {
$bResult = false; $bResult = false;
if ($this->oLogger) if ($this->oLogger)
{ {
$this->oLogger->Write('Something went wrong. Either the current password is incorrect or new password does not match the criteria.'); $this->oLogger->Write('Something went wrong. Either the current password is incorrect or new password does not match the criteria.');
} }
} }
} }
catch (\Exception $oException) catch (\Exception $oException)
{ {