[ChangePassword] Fixed bug when valid days of password equal to zero.
authorJonathan Bueno <jonathan.bueno@openbravo.com>
Mon, 28 Dec 2015 16:19:59 +0100
changeset 28654 98f413d9c6ff
parent 28653 7aa2ff0744bb
child 28655 6456577534a0
[ChangePassword] Fixed bug when valid days of password equal to zero.
src/org/openbravo/base/secureApp/LoginUtils.java
--- a/src/org/openbravo/base/secureApp/LoginUtils.java	Thu Dec 24 11:56:20 2015 +0100
+++ b/src/org/openbravo/base/secureApp/LoginUtils.java	Mon Dec 28 16:19:59 2015 +0100
@@ -128,7 +128,7 @@
       User userOB = listUser.get(0);
       Date lastUpdateDate = userOB.getLastupdatepassworddate();
       Long validityDays = userOB.getClient().getDaystopasswordexpiration();
-      if (validityDays != null && validityDays >= 0) {
+      if (validityDays != null && validityDays > 0) {
         Calendar currentDate = Calendar.getInstance();
         currentDate
             .setTimeInMillis(lastUpdateDate.getTime() + TimeUnit.DAYS.toMillis(validityDays));