[ChangePassword] Renamed AD elements,added messages,renamed some variables, trigger updated
authorJonathan Bueno <jonathan.bueno@openbravo.com>
Thu, 24 Dec 2015 11:56:20 +0100
changeset 28653 7aa2ff0744bb
parent 28652 26d23375a92b
child 28654 98f413d9c6ff
[ChangePassword] Renamed AD elements,added messages,renamed some variables, trigger updated
src-db/database/model/tables/AD_CLIENT.xml
src-db/database/model/tables/AD_USER.xml
src-db/database/model/triggers/AD_USER_EXPIRYPASS_TRG.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_MESSAGE.xml
src/org/openbravo/authentication/AuthenticationExpiryPasswordException.java
src/org/openbravo/authentication/basic/DefaultAuthenticationManager.java
src/org/openbravo/base/secureApp/LoginHandler.java
src/org/openbravo/base/secureApp/LoginUtils.java
--- a/src-db/database/model/tables/AD_CLIENT.xml	Wed Dec 23 10:55:13 2015 +0100
+++ b/src-db/database/model/tables/AD_CLIENT.xml	Thu Dec 24 11:56:20 2015 +0100
@@ -193,7 +193,7 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
-      <column name="VALIDDAYS" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
+      <column name="DAYSTOPASSWORDEXPIRATION" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
         <default><![CDATA[0]]></default>
         <onCreateDefault/>
       </column>
--- a/src-db/database/model/tables/AD_USER.xml	Wed Dec 23 10:55:13 2015 +0100
+++ b/src-db/database/model/tables/AD_USER.xml	Thu Dec 24 11:56:20 2015 +0100
@@ -157,7 +157,7 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault><![CDATA['N']]></onCreateDefault>
       </column>
-      <column name="UPDATEPASSWORDDATE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
+      <column name="LASTUPDATEPASSWORDDATE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
         <default><![CDATA[SYSDATE]]></default>
         <onCreateDefault/>
       </column>
--- a/src-db/database/model/triggers/AD_USER_EXPIRYPASS_TRG.xml	Wed Dec 23 10:55:13 2015 +0100
+++ b/src-db/database/model/triggers/AD_USER_EXPIRYPASS_TRG.xml	Thu Dec 24 11:56:20 2015 +0100
@@ -17,7 +17,7 @@
 * The Initial Developer of the Original Code is Openbravo SLU
 * All portions are Copyright (C) 2015 Openbravo SLU
 * All Rights Reserved.
-* Contributor(s):  ______________________________________.
+* Contributor(s):  __JBU____________________________________.
 ************************************************************************/
  
  BEGIN
@@ -25,13 +25,15 @@
    IF AD_isTriggerEnabled()='N' THEN IF UPDATING THEN RETURN OLD; ELSE RETURN NEW; END IF; 
    END IF;
 
-
+   IF :OLD.password<>:NEW.password THEN
      
    UPDATE ad_user
-   SET updatepassworddate='now()'
-   WHERE ad_user_id=:NEW.ad_user_id AND :OLD.password<>:NEW.password;
+   SET lastupdatepassworddate='now()'
+   WHERE ad_user_id=:NEW.ad_user_id;
+
+   ELSE RETURN NEW; END IF;
  
-  END AD_USER_EXPIRYPASS_TRG
+   END AD_USER_EXPIRYPASS_TRG
 ]]></body>
     </trigger>
   </database>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Wed Dec 23 10:55:13 2015 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Thu Dec 24 11:56:20 2015 +0100
@@ -225582,6 +225582,43 @@
 <!--06D3A446DE4747D085367B10876B6B9E-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--06D3A446DE4747D085367B10876B6B9E--></AD_COLUMN>
 
+<!--06EF3D56611445C4BAC1A2ACE23AD94A--><AD_COLUMN>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <AD_COLUMN_ID><![CDATA[06EF3D56611445C4BAC1A2ACE23AD94A]]></AD_COLUMN_ID>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <NAME><![CDATA[Daystopasswordexpiration]]></NAME>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <DESCRIPTION><![CDATA[Define the days that user password must be valid from previous password change]]></DESCRIPTION>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <HELP><![CDATA[Define the days that user password must be valid from previous password change, if value is set to 0 no update will be required, for value greater than 0, password must be updated when the last password update date of the user plus the days defined here achieves. It will affect to all users depending the client.]]></HELP>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <COLUMNNAME><![CDATA[Daystopasswordexpiration]]></COLUMNNAME>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <AD_TABLE_ID><![CDATA[112]]></AD_TABLE_ID>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <DEFAULTVALUE><![CDATA[0]]></DEFAULTVALUE>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <SEQNO><![CDATA[321]]></SEQNO>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <VALUEMIN><![CDATA[0]]></VALUEMIN>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <AD_ELEMENT_ID><![CDATA[02F1D370B8B34FB79D151811C705B200]]></AD_ELEMENT_ID>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <POSITION><![CDATA[51]]></POSITION>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A--></AD_COLUMN>
+
 <!--070CB5DDE659436984E4DEB06100AC41--><AD_COLUMN>
 <!--070CB5DDE659436984E4DEB06100AC41-->  <AD_COLUMN_ID><![CDATA[070CB5DDE659436984E4DEB06100AC41]]></AD_COLUMN_ID>
 <!--070CB5DDE659436984E4DEB06100AC41-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -231959,6 +231996,42 @@
 <!--1F9C02B7A18448368C4E137F971747BF-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--1F9C02B7A18448368C4E137F971747BF--></AD_COLUMN>
 
+<!--1FEFAB2F6215496FA9026D5FF7706F6F--><AD_COLUMN>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <AD_COLUMN_ID><![CDATA[1FEFAB2F6215496FA9026D5FF7706F6F]]></AD_COLUMN_ID>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <NAME><![CDATA[Lastupdatepassworddate]]></NAME>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <DESCRIPTION><![CDATA[Latest date of user password change]]></DESCRIPTION>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <HELP><![CDATA[Latest date of user password change]]></HELP>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <COLUMNNAME><![CDATA[Lastupdatepassworddate]]></COLUMNNAME>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <AD_TABLE_ID><![CDATA[114]]></AD_TABLE_ID>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <DEFAULTVALUE><![CDATA[@#Date@]]></DEFAULTVALUE>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <SEQNO><![CDATA[131]]></SEQNO>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <AD_ELEMENT_ID><![CDATA[D570CE6C7BB4426BBEBDA54C7D1EFF3B]]></AD_ELEMENT_ID>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <POSITION><![CDATA[42]]></POSITION>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--1FEFAB2F6215496FA9026D5FF7706F6F--></AD_COLUMN>
+
 <!--200D1AA20B4D437FB6EEE9D899D0FD87--><AD_COLUMN>
 <!--200D1AA20B4D437FB6EEE9D899D0FD87-->  <AD_COLUMN_ID><![CDATA[200D1AA20B4D437FB6EEE9D899D0FD87]]></AD_COLUMN_ID>
 <!--200D1AA20B4D437FB6EEE9D899D0FD87-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -238907,40 +238980,6 @@
 <!--3D20749B2D1642F591849DA6CD6EB654-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--3D20749B2D1642F591849DA6CD6EB654--></AD_COLUMN>
 
-<!--3D4F9C2BB8BB4066871C7E735264E1E9--><AD_COLUMN>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <AD_COLUMN_ID><![CDATA[3D4F9C2BB8BB4066871C7E735264E1E9]]></AD_COLUMN_ID>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <NAME><![CDATA[Update Password Date]]></NAME>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <COLUMNNAME><![CDATA[Updatepassworddate]]></COLUMNNAME>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <AD_TABLE_ID><![CDATA[114]]></AD_TABLE_ID>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <DEFAULTVALUE><![CDATA[1970-01-01 00:00:00]]></DEFAULTVALUE>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISKEY><![CDATA[N]]></ISKEY>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <SEQNO><![CDATA[131]]></SEQNO>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <AD_ELEMENT_ID><![CDATA[46838973B16F44FDA62103C620EA7061]]></AD_ELEMENT_ID>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <POSITION><![CDATA[42]]></POSITION>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
-<!--3D4F9C2BB8BB4066871C7E735264E1E9--></AD_COLUMN>
-
 <!--3D5960AA56AA42E9B213091E314A51BE--><AD_COLUMN>
 <!--3D5960AA56AA42E9B213091E314A51BE-->  <AD_COLUMN_ID><![CDATA[3D5960AA56AA42E9B213091E314A51BE]]></AD_COLUMN_ID>
 <!--3D5960AA56AA42E9B213091E314A51BE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -293580,40 +293619,6 @@
 <!--88BFF23CE5664105A1EA10AFB8B50FA9-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--88BFF23CE5664105A1EA10AFB8B50FA9--></AD_COLUMN>
 
-<!--88DB9DC7F36A489BAF9352B0EE370269--><AD_COLUMN>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <AD_COLUMN_ID><![CDATA[88DB9DC7F36A489BAF9352B0EE370269]]></AD_COLUMN_ID>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <NAME><![CDATA[Validdays]]></NAME>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <COLUMNNAME><![CDATA[Validdays]]></COLUMNNAME>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <AD_TABLE_ID><![CDATA[112]]></AD_TABLE_ID>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <DEFAULTVALUE><![CDATA[0]]></DEFAULTVALUE>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISKEY><![CDATA[N]]></ISKEY>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <SEQNO><![CDATA[321]]></SEQNO>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <AD_ELEMENT_ID><![CDATA[B03A1F4D40304FFEBF408CD15457CEC9]]></AD_ELEMENT_ID>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <POSITION><![CDATA[50]]></POSITION>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
-<!--88DB9DC7F36A489BAF9352B0EE370269-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
-<!--88DB9DC7F36A489BAF9352B0EE370269--></AD_COLUMN>
-
 <!--88FA1C15FABD493EAF04D590F6DA945F--><AD_COLUMN>
 <!--88FA1C15FABD493EAF04D590F6DA945F-->  <AD_COLUMN_ID><![CDATA[88FA1C15FABD493EAF04D590F6DA945F]]></AD_COLUMN_ID>
 <!--88FA1C15FABD493EAF04D590F6DA945F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Wed Dec 23 10:55:13 2015 +0100
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Dec 24 11:56:20 2015 +0100
@@ -21000,6 +21000,20 @@
 <!--026C0C35D730459B865E7242955C87F2-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--026C0C35D730459B865E7242955C87F2--></AD_ELEMENT>
 
+<!--02F1D370B8B34FB79D151811C705B200--><AD_ELEMENT>
+<!--02F1D370B8B34FB79D151811C705B200-->  <AD_ELEMENT_ID><![CDATA[02F1D370B8B34FB79D151811C705B200]]></AD_ELEMENT_ID>
+<!--02F1D370B8B34FB79D151811C705B200-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--02F1D370B8B34FB79D151811C705B200-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--02F1D370B8B34FB79D151811C705B200-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--02F1D370B8B34FB79D151811C705B200-->  <COLUMNNAME><![CDATA[Daystopasswordexpiration]]></COLUMNNAME>
+<!--02F1D370B8B34FB79D151811C705B200-->  <NAME><![CDATA[Days To Password Expiration]]></NAME>
+<!--02F1D370B8B34FB79D151811C705B200-->  <PRINTNAME><![CDATA[Days To Password Expiration]]></PRINTNAME>
+<!--02F1D370B8B34FB79D151811C705B200-->  <DESCRIPTION><![CDATA[Define the days that user password must be valid from previous password change]]></DESCRIPTION>
+<!--02F1D370B8B34FB79D151811C705B200-->  <HELP><![CDATA[Define the days that user password must be valid from previous password change, if value is set to 0 no update will be required, for value greater than 0, password must be updated when the last password update date of the user plus the days defined here achieves. It will affect to all users depending the client.]]></HELP>
+<!--02F1D370B8B34FB79D151811C705B200-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--02F1D370B8B34FB79D151811C705B200-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--02F1D370B8B34FB79D151811C705B200--></AD_ELEMENT>
+
 <!--035BE38188FC44538E3DDDA769800CFB--><AD_ELEMENT>
 <!--035BE38188FC44538E3DDDA769800CFB-->  <AD_ELEMENT_ID><![CDATA[035BE38188FC44538E3DDDA769800CFB]]></AD_ELEMENT_ID>
 <!--035BE38188FC44538E3DDDA769800CFB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -22846,18 +22860,6 @@
 <!--465508E49DA34D0394E2EC1B14DB6FD9-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--465508E49DA34D0394E2EC1B14DB6FD9--></AD_ELEMENT>
 
-<!--46838973B16F44FDA62103C620EA7061--><AD_ELEMENT>
-<!--46838973B16F44FDA62103C620EA7061-->  <AD_ELEMENT_ID><![CDATA[46838973B16F44FDA62103C620EA7061]]></AD_ELEMENT_ID>
-<!--46838973B16F44FDA62103C620EA7061-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--46838973B16F44FDA62103C620EA7061-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--46838973B16F44FDA62103C620EA7061-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--46838973B16F44FDA62103C620EA7061-->  <COLUMNNAME><![CDATA[Updatepassworddate]]></COLUMNNAME>
-<!--46838973B16F44FDA62103C620EA7061-->  <NAME><![CDATA[Update Password Date]]></NAME>
-<!--46838973B16F44FDA62103C620EA7061-->  <PRINTNAME><![CDATA[Update Password Date]]></PRINTNAME>
-<!--46838973B16F44FDA62103C620EA7061-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--46838973B16F44FDA62103C620EA7061-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
-<!--46838973B16F44FDA62103C620EA7061--></AD_ELEMENT>
-
 <!--46C995886E534B6BA240599DACD8240B--><AD_ELEMENT>
 <!--46C995886E534B6BA240599DACD8240B-->  <AD_ELEMENT_ID><![CDATA[46C995886E534B6BA240599DACD8240B]]></AD_ELEMENT_ID>
 <!--46C995886E534B6BA240599DACD8240B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -30528,18 +30530,6 @@
 <!--AFEC76A1618B47CA85630F223540FA38-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--AFEC76A1618B47CA85630F223540FA38--></AD_ELEMENT>
 
-<!--B03A1F4D40304FFEBF408CD15457CEC9--><AD_ELEMENT>
-<!--B03A1F4D40304FFEBF408CD15457CEC9-->  <AD_ELEMENT_ID><![CDATA[B03A1F4D40304FFEBF408CD15457CEC9]]></AD_ELEMENT_ID>
-<!--B03A1F4D40304FFEBF408CD15457CEC9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--B03A1F4D40304FFEBF408CD15457CEC9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--B03A1F4D40304FFEBF408CD15457CEC9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--B03A1F4D40304FFEBF408CD15457CEC9-->  <COLUMNNAME><![CDATA[Validdays]]></COLUMNNAME>
-<!--B03A1F4D40304FFEBF408CD15457CEC9-->  <NAME><![CDATA[Validdays]]></NAME>
-<!--B03A1F4D40304FFEBF408CD15457CEC9-->  <PRINTNAME><![CDATA[Validdays]]></PRINTNAME>
-<!--B03A1F4D40304FFEBF408CD15457CEC9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--B03A1F4D40304FFEBF408CD15457CEC9-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
-<!--B03A1F4D40304FFEBF408CD15457CEC9--></AD_ELEMENT>
-
 <!--B04AF439C0EDCC90E040007F010032CD--><AD_ELEMENT>
 <!--B04AF439C0EDCC90E040007F010032CD-->  <AD_ELEMENT_ID><![CDATA[B04AF439C0EDCC90E040007F010032CD]]></AD_ELEMENT_ID>
 <!--B04AF439C0EDCC90E040007F010032CD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -32552,6 +32542,20 @@
 <!--D562603297394ACD82F50464ABB8F6EF-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--D562603297394ACD82F50464ABB8F6EF--></AD_ELEMENT>
 
+<!--D570CE6C7BB4426BBEBDA54C7D1EFF3B--><AD_ELEMENT>
+<!--D570CE6C7BB4426BBEBDA54C7D1EFF3B-->  <AD_ELEMENT_ID><![CDATA[D570CE6C7BB4426BBEBDA54C7D1EFF3B]]></AD_ELEMENT_ID>
+<!--D570CE6C7BB4426BBEBDA54C7D1EFF3B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D570CE6C7BB4426BBEBDA54C7D1EFF3B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D570CE6C7BB4426BBEBDA54C7D1EFF3B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D570CE6C7BB4426BBEBDA54C7D1EFF3B-->  <COLUMNNAME><![CDATA[Lastupdatepassworddate]]></COLUMNNAME>
+<!--D570CE6C7BB4426BBEBDA54C7D1EFF3B-->  <NAME><![CDATA[Last Update Password Date]]></NAME>
+<!--D570CE6C7BB4426BBEBDA54C7D1EFF3B-->  <PRINTNAME><![CDATA[Last Update Password Date]]></PRINTNAME>
+<!--D570CE6C7BB4426BBEBDA54C7D1EFF3B-->  <DESCRIPTION><![CDATA[Latest date of user password change]]></DESCRIPTION>
+<!--D570CE6C7BB4426BBEBDA54C7D1EFF3B-->  <HELP><![CDATA[Latest date of user password change]]></HELP>
+<!--D570CE6C7BB4426BBEBDA54C7D1EFF3B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D570CE6C7BB4426BBEBDA54C7D1EFF3B-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--D570CE6C7BB4426BBEBDA54C7D1EFF3B--></AD_ELEMENT>
+
 <!--D5CB4C07B1F3408AB06BD8BC776494AA--><AD_ELEMENT>
 <!--D5CB4C07B1F3408AB06BD8BC776494AA-->  <AD_ELEMENT_ID><![CDATA[D5CB4C07B1F3408AB06BD8BC776494AA]]></AD_ELEMENT_ID>
 <!--D5CB4C07B1F3408AB06BD8BC776494AA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Wed Dec 23 10:55:13 2015 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Thu Dec 24 11:56:20 2015 +0100
@@ -183867,34 +183867,6 @@
 <!--10D622C19C1C407A99F66025D7470B76-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--10D622C19C1C407A99F66025D7470B76--></AD_FIELD>
 
-<!--10DB133E8FDE4DD98E298833940D8DE7--><AD_FIELD>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <AD_FIELD_ID><![CDATA[10DB133E8FDE4DD98E298833940D8DE7]]></AD_FIELD_ID>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <NAME><![CDATA[Days to Password Expiration]]></NAME>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <DESCRIPTION><![CDATA[Define the days that user password must be valid from previous password change]]></DESCRIPTION>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <HELP><![CDATA[Define the days that user password must be valid from previous password change, if value is set to 0 no update will be required, for value greater than 0, password must be updated when the last password update date of the user plus the days defined here achieves.]]></HELP>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <AD_TAB_ID><![CDATA[145]]></AD_TAB_ID>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <AD_COLUMN_ID><![CDATA[88DB9DC7F36A489BAF9352B0EE370269]]></AD_COLUMN_ID>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <SEQNO><![CDATA[80]]></SEQNO>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
-<!--10DB133E8FDE4DD98E298833940D8DE7-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
-<!--10DB133E8FDE4DD98E298833940D8DE7--></AD_FIELD>
-
 <!--10EE6FF9FCFD4194A110F11C7DB8115A--><AD_FIELD>
 <!--10EE6FF9FCFD4194A110F11C7DB8115A-->  <AD_FIELD_ID><![CDATA[10EE6FF9FCFD4194A110F11C7DB8115A]]></AD_FIELD_ID>
 <!--10EE6FF9FCFD4194A110F11C7DB8115A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -203498,6 +203470,34 @@
 <!--419FEB9778C044FE83E606EA4548A1B4-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--419FEB9778C044FE83E606EA4548A1B4--></AD_FIELD>
 
+<!--41AD871370F04BA7AE780F013DEE70DF--><AD_FIELD>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <AD_FIELD_ID><![CDATA[41AD871370F04BA7AE780F013DEE70DF]]></AD_FIELD_ID>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <NAME><![CDATA[Last Update Password Date]]></NAME>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <DESCRIPTION><![CDATA[Latest date of user password change]]></DESCRIPTION>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <HELP><![CDATA[Latest date of user password change]]></HELP>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <AD_TAB_ID><![CDATA[118]]></AD_TAB_ID>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <AD_COLUMN_ID><![CDATA[1FEFAB2F6215496FA9026D5FF7706F6F]]></AD_COLUMN_ID>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <DISPLAYLENGTH><![CDATA[19]]></DISPLAYLENGTH>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <SEQNO><![CDATA[300]]></SEQNO>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--41AD871370F04BA7AE780F013DEE70DF-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--41AD871370F04BA7AE780F013DEE70DF--></AD_FIELD>
+
 <!--41AE565AFD0948F18A78A09BB41106CD--><AD_FIELD>
 <!--41AE565AFD0948F18A78A09BB41106CD-->  <AD_FIELD_ID><![CDATA[41AE565AFD0948F18A78A09BB41106CD]]></AD_FIELD_ID>
 <!--41AE565AFD0948F18A78A09BB41106CD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -204938,34 +204938,6 @@
 <!--44D815496B5B4EDF97B562977ED58556-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--44D815496B5B4EDF97B562977ED58556--></AD_FIELD>
 
-<!--44FA9B5980474579845B7A0175DE24C7--><AD_FIELD>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <AD_FIELD_ID><![CDATA[44FA9B5980474579845B7A0175DE24C7]]></AD_FIELD_ID>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <NAME><![CDATA[Update Password Date]]></NAME>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <DESCRIPTION><![CDATA[Latest date of user password change]]></DESCRIPTION>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <HELP><![CDATA[Shows the latest date of user password change]]></HELP>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <AD_TAB_ID><![CDATA[118]]></AD_TAB_ID>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <AD_COLUMN_ID><![CDATA[3D4F9C2BB8BB4066871C7E735264E1E9]]></AD_COLUMN_ID>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <DISPLAYLENGTH><![CDATA[19]]></DISPLAYLENGTH>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <SEQNO><![CDATA[300]]></SEQNO>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
-<!--44FA9B5980474579845B7A0175DE24C7-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
-<!--44FA9B5980474579845B7A0175DE24C7--></AD_FIELD>
-
 <!--44FB2A13EF4E455AB7380E9880B23222--><AD_FIELD>
 <!--44FB2A13EF4E455AB7380E9880B23222-->  <AD_FIELD_ID><![CDATA[44FB2A13EF4E455AB7380E9880B23222]]></AD_FIELD_ID>
 <!--44FB2A13EF4E455AB7380E9880B23222-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -225327,6 +225299,34 @@
 <!--625D3468BEE14D7C800A712B2F8306B3-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--625D3468BEE14D7C800A712B2F8306B3--></AD_FIELD>
 
+<!--626DBD89E53645F79542B2A9B9B38F17--><AD_FIELD>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <AD_FIELD_ID><![CDATA[626DBD89E53645F79542B2A9B9B38F17]]></AD_FIELD_ID>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <NAME><![CDATA[Days To Password Expiration]]></NAME>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <DESCRIPTION><![CDATA[Define the days that user password must be valid from previous password change]]></DESCRIPTION>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <HELP><![CDATA[Define the days that user password must be valid from previous password change, if value is set to 0 no update will be required, for value greater than 0, password must be updated when the last password update date of the user plus the days defined here achieves. It will affect to all users depending the client.]]></HELP>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <AD_TAB_ID><![CDATA[145]]></AD_TAB_ID>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <AD_COLUMN_ID><![CDATA[06EF3D56611445C4BAC1A2ACE23AD94A]]></AD_COLUMN_ID>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <SEQNO><![CDATA[80]]></SEQNO>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--626DBD89E53645F79542B2A9B9B38F17-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--626DBD89E53645F79542B2A9B9B38F17--></AD_FIELD>
+
 <!--62771C59EBEC4D989520CE0A299956D0--><AD_FIELD>
 <!--62771C59EBEC4D989520CE0A299956D0-->  <AD_FIELD_ID><![CDATA[62771C59EBEC4D989520CE0A299956D0]]></AD_FIELD_ID>
 <!--62771C59EBEC4D989520CE0A299956D0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Dec 23 10:55:13 2015 +0100
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Dec 24 11:56:20 2015 +0100
@@ -16102,6 +16102,18 @@
 <!--0A04D7BA3A1D466A82B15AE10CFFE252-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--0A04D7BA3A1D466A82B15AE10CFFE252--></AD_MESSAGE>
 
+<!--0BA24B8217B04C7DBCCFE0DEAF498679--><AD_MESSAGE>
+<!--0BA24B8217B04C7DBCCFE0DEAF498679-->  <AD_MESSAGE_ID><![CDATA[0BA24B8217B04C7DBCCFE0DEAF498679]]></AD_MESSAGE_ID>
+<!--0BA24B8217B04C7DBCCFE0DEAF498679-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--0BA24B8217B04C7DBCCFE0DEAF498679-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--0BA24B8217B04C7DBCCFE0DEAF498679-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--0BA24B8217B04C7DBCCFE0DEAF498679-->  <VALUE><![CDATA[CPEmptyUserPassword]]></VALUE>
+<!--0BA24B8217B04C7DBCCFE0DEAF498679-->  <MSGTEXT><![CDATA[Please enter your username and password.]]></MSGTEXT>
+<!--0BA24B8217B04C7DBCCFE0DEAF498679-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--0BA24B8217B04C7DBCCFE0DEAF498679-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--0BA24B8217B04C7DBCCFE0DEAF498679-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--0BA24B8217B04C7DBCCFE0DEAF498679--></AD_MESSAGE>
+
 <!--0BA839D8B467422AB19C8E1B3B033051--><AD_MESSAGE>
 <!--0BA839D8B467422AB19C8E1B3B033051-->  <AD_MESSAGE_ID><![CDATA[0BA839D8B467422AB19C8E1B3B033051]]></AD_MESSAGE_ID>
 <!--0BA839D8B467422AB19C8E1B3B033051-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src/org/openbravo/authentication/AuthenticationExpiryPasswordException.java	Wed Dec 23 10:55:13 2015 +0100
+++ b/src/org/openbravo/authentication/AuthenticationExpiryPasswordException.java	Thu Dec 24 11:56:20 2015 +0100
@@ -16,8 +16,9 @@
 import org.openbravo.erpCommon.utility.OBError;
 
 /**
+ * This exception is used in case password for user has expired. Exception is launched in case that
+ * last update password date for user plus validity days defined for client has been reached
  * 
- * @author jbu
  */
 public class AuthenticationExpiryPasswordException extends OBException {
   private static final long serialVersionUID = 1L;
--- a/src/org/openbravo/authentication/basic/DefaultAuthenticationManager.java	Wed Dec 23 10:55:13 2015 +0100
+++ b/src/org/openbravo/authentication/basic/DefaultAuthenticationManager.java	Thu Dec 24 11:56:20 2015 +0100
@@ -13,7 +13,6 @@
 package org.openbravo.authentication.basic;
 
 import java.io.IOException;
-import java.util.Calendar;
 import java.util.Date;
 
 import javax.servlet.ServletException;
@@ -75,14 +74,11 @@
     // Begins code related to login process
     if (resetPassword) {
       strUser = vars.getStringParameter("loggedUser");
-      strPass = vars.getStringParameter("password");
-      username = strUser;
     } else {
       strUser = vars.getStringParameter("user");
-      strPass = vars.getStringParameter("password");
-      username = strUser;
     }
-
+    strPass = vars.getStringParameter("password");
+    username = strUser;
     if (StringUtils.isEmpty(strUser)) {
       // redirects to the menu or the menu with the target
       setTargetInfoInVariables(request, variables);
@@ -111,14 +107,13 @@
       throw new AuthenticationException("IDENTIFICATION_FAILURE_TITLE", errorMsg);
     }
     // Check if password valid date is reached
-    Date dateUPD = LoginUtils.getUpdatePasswordDate(conn, strUser, strPass);
+    Date lastUpdatePasswordDate = LoginUtils.getUpdatePasswordDate(conn, strUser, strPass);
 
-    if (dateUPD != null) {
+    if (lastUpdatePasswordDate != null) {
 
       // Checks if password
-      Calendar currentDate = Calendar.getInstance();
-      Date today = new Date(currentDate.getTimeInMillis());
-      if (dateUPD.compareTo(today) <= 0) {
+      Date today = new Date();
+      if (lastUpdatePasswordDate.compareTo(today) <= 0) {
         log4j.debug("Failed user/password. Username: " + strUser + " - Session ID:" + sessionId);
         OBError errorMsg = new OBError();
         errorMsg.setType("Error");
--- a/src/org/openbravo/base/secureApp/LoginHandler.java	Wed Dec 23 10:55:13 2015 +0100
+++ b/src/org/openbravo/base/secureApp/LoginHandler.java	Thu Dec 24 11:56:20 2015 +0100
@@ -415,8 +415,8 @@
   protected final void goToRetry(HttpServletResponse response, VariablesSecureApp vars,
       String message, String title, String msgType, String action, boolean doRedirect)
       throws IOException, ServletException {
-    String msg = (message != null && !message.equals("")) ? message
-        : "Please enter your username and password.";
+    String msg = (message != null && !message.equals("")) ? message : Utility.messageBD(myPool,
+        "CPEmptyUserPassword", vars.getLanguage());
 
     if (OBVersion.getInstance().is30() && !doRedirect) {
       // 3.0 instances show the message in the same login window, return a json object with the info
@@ -470,8 +470,9 @@
   protected final void goToUpdatePassword(HttpServletResponse response, VariablesSecureApp vars,
       String message, String title, String msgType, String action, boolean doRedirect)
       throws IOException, ServletException {
-    String msg = (message != null && !message.equals("")) ? message
-        : "Please enter your username and password.";
+    String msg = (message != null && !message.equals("")) ? message : Utility.messageBD(myPool,
+        "CPEmptyUserPassword", vars.getLanguage());
+    ;
 
     if (OBVersion.getInstance().is30() && !doRedirect) {
       // 3.0 instances show the message in the same login window, return a json object with the info
--- a/src/org/openbravo/base/secureApp/LoginUtils.java	Wed Dec 23 10:55:13 2015 +0100
+++ b/src/org/openbravo/base/secureApp/LoginUtils.java	Thu Dec 24 11:56:20 2015 +0100
@@ -126,9 +126,9 @@
       obc.setFilterOnReadableClients(false);
       final List<User> listUser = obc.list();
       User userOB = listUser.get(0);
-      Date lastUpdateDate = userOB.getUpdatePasswordDate();
-      Long validityDays = userOB.getClient().getValiddays();
-      if (validityDays != 0) {
+      Date lastUpdateDate = userOB.getLastupdatepassworddate();
+      Long validityDays = userOB.getClient().getDaystopasswordexpiration();
+      if (validityDays != null && validityDays >= 0) {
         Calendar currentDate = Calendar.getInstance();
         currentDate
             .setTimeInMillis(lastUpdateDate.getTime() + TimeUnit.DAYS.toMillis(validityDays));