Update code
This commit is contained in:
@@ -181,6 +181,10 @@ public class UserDao {
|
||||
log.info("Password reset attempt for non-existent user: {}", resetPasswordReq.getEmail());
|
||||
throw new ResourceNotFoundException(Status.NOT_FOUND, Translator.toLocale(GepafinConstant.USER_NOT_FOUND_MSG));
|
||||
}
|
||||
if (!resetPasswordReq.getNewPassword().equals(resetPasswordReq.getConfirmPassword())) {
|
||||
log.info("User creation failed: Passwords do not match for email {}", user.getEmail());
|
||||
throw new CustomValidationException(Status.VALIDATION_ERROR, Translator.toLocale(GepafinConstant.PASSWORD_DOESNT_MATCH));
|
||||
}
|
||||
String dbToken = user.getResetPasswordToken();
|
||||
|
||||
if (dbToken == null || !dbToken.equals(resetPasswordReq.getToken())) {
|
||||
|
||||
Reference in New Issue
Block a user