details:   https://code.openbravo.com/erp/devel/pi/rev/1287606da0c8
changeset: 36003:1287606da0c8
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Wed Jun 05 16:15:03 2019 +0200
summary:   fixed issue 41032: ad_session.updated is not updated after 
inactivating session

diffstat:

 src/org/openbravo/erpCommon/security/SessionLogin_data.xsql |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r e6f834be7a9d -r 1287606da0c8 
src/org/openbravo/erpCommon/security/SessionLogin_data.xsql
--- a/src/org/openbravo/erpCommon/security/SessionLogin_data.xsql       Wed Jun 
05 11:40:40 2019 +0000
+++ b/src/org/openbravo/erpCommon/security/SessionLogin_data.xsql       Wed Jun 
05 16:15:03 2019 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2017 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2019 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -30,7 +30,8 @@
   <SqlMethod name="deactivate" type="preparedStatement" return="rowCount">
     <Sql><![CDATA[
         UPDATE AD_Session
-        SET SESSION_ACTIVE = 'N'  
+        SET SESSION_ACTIVE = 'N',
+            UPDATED = NOW()
         WHERE AD_Session.AD_Session_ID = ? 
     ]]></Sql>
     <Parameter name="adSessionId"/>
@@ -39,7 +40,8 @@
   <SqlMethod name="deactivateExpiredSessions" type="preparedStatement" 
return="rowCount">
     <Sql><![CDATA[
         UPDATE AD_Session
-           SET Session_Active = 'N'
+           SET Session_Active = 'N',
+               updated = now()
          WHERE Session_Active = 'Y'
            AND (Last_Session_Ping < to_timestamp(?, 'YYYY-MM-DD HH24:MI:SS')
              or (Last_Session_Ping is null and created < now() - 1))


_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to