We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9138a1 commit 7ff5587Copy full SHA for 7ff5587
src/main/java/com/joaov1ct0r/restful_api_users_java/modules/users/services/ResetPasswordService.java
@@ -35,12 +35,13 @@ public void execute(ResetPasswordDTO resetPasswordDTO) throws Exception {
35
}
36
37
var userToUpdate = isUserRegistered.get();
38
- userToUpdate.setPassword("123456");
+ String newUserPassword = this.generator.generateRandomPassword(9);
39
+ userToUpdate.setPassword(newUserPassword);
40
this.userRepository.save(userToUpdate);
41
this.emailService.sendMail(
42
userToUpdate.getEmail(),
43
"Password Updated",
- "Your new password is: " + this.generator.generateRandomPassword(9)
44
+ "Your new password is: " + newUserPassword
45
);
46
47
0 commit comments