Always write encrypted password. Fixes #14
This commit is contained in:
parent
aa4610ef39
commit
1afb27745d
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ public class UserService implements Serializable {
|
|||
@Transactional
|
||||
public boolean changePassword(@NonNull User user, @NonNull String oldPassword, @NonNull String newPassword) {
|
||||
if (checkPassword(user, oldPassword)) {
|
||||
user.setPassword(newPassword);
|
||||
user.setPassword(passwordEncoder.encode(newPassword));
|
||||
entityManager.merge(user);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue