adamsaghy commented on code in PR #5369:
URL: https://github.com/apache/fineract/pull/5369#discussion_r2816692274
##########
fineract-core/src/main/java/org/apache/fineract/useradministration/domain/AppUser.java:
##########
@@ -236,6 +239,25 @@ public void updatePassword(final String encodePassword) {
}
+ public void updateTemporaryPassword(final String encodedPassword, final
java.time.LocalDateTime expiryTime) {
+ this.password = encodedPassword;
+ this.temporaryPasswordExpiryTime = expiryTime;
+ this.firstTimeLoginRemaining = true;
+ this.lastTimePasswordUpdated = DateUtils.getBusinessLocalDate();
+ this.passwordNeverExpires = false;
+ }
+
+ public boolean isTemporaryPasswordExpired() {
+ if (this.temporaryPasswordExpiryTime == null) {
+ return false;
+ }
+ return
java.time.LocalDateTime.now(java.time.ZoneId.systemDefault()).isAfter(this.temporaryPasswordExpiryTime);
Review Comment:
Use UTC for simplicity!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]