Nothing important, just some comments and small code style fixes

This commit is contained in:
slawkens
2023-06-19 08:03:47 +02:00
parent dcf9a45974
commit b09adc836d
5 changed files with 15 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ else
}
$password_strlen = strlen($new_password);
if($new_password != $new_password2) {
$errors[] = "The new passwords do not match!";
$errors[] = 'The new passwords do not match!';
}
if(empty($errors)) {
@@ -31,6 +31,7 @@ else
$errors[] = Validator::getLastError();
}
/** @var OTS_Account $account_logged */
$old_password = encrypt(($config_salt_enabled ? $account_logged->getCustomField('salt') : '') . $old_password);
if($old_password != $account_logged->getPassword()) {
$errors[] = "Current password is incorrect!";
@@ -78,6 +79,4 @@ else
));
setSession('password', $new_password);
}
}
?>
}