Always write encrypted password. Fixes #14

This commit is contained in:
f43nd1r 2018-07-24 10:24:03 +02:00
parent aa4610ef39
commit 1afb27745d

View file

@ -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;
}