Ensuring the mustChangePassword flag is reset to false in case a password value 
is set


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/199b6643
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/199b6643
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/199b6643

Branch: refs/heads/2_0_X
Commit: 199b66432bc835a715de0961bbd9cff12123745b
Parents: 320f37d
Author: Francesco Chicchiriccò <[email protected]>
Authored: Thu Dec 21 09:02:28 2017 +0100
Committer: Francesco Chicchiriccò <[email protected]>
Committed: Thu Dec 21 09:02:45 2017 +0100

----------------------------------------------------------------------
 .../apache/syncope/core/persistence/jpa/entity/user/JPAUser.java    | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/199b6643/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPAUser.java
----------------------------------------------------------------------
diff --git 
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPAUser.java
 
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPAUser.java
index 15407d9..b3dfac1 100644
--- 
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPAUser.java
+++ 
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPAUser.java
@@ -263,6 +263,7 @@ public class JPAUser
         try {
             this.password = ENCRYPTOR.encode(password, cipherAlgoritm);
             this.cipherAlgorithm = cipherAlgoritm;
+            setMustChangePassword(false);
         } catch (Exception e) {
             LOG.error("Could not encode password", e);
             this.password = null;

Reply via email to