From a415621def016bda944827854584a31bda4252bd Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 29 May 2015 10:13:08 -0500 Subject: [PATCH] IDEMPIERE-1800 Reset Locked Account shows all clients / IDEMPIERE-373 / partial backout of b2dd142 - DateLastLogin=NULL is required --- .../src/org/adempiere/process/ResetLockedAccount.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java b/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java index 6876d871a6..2a4f5282d2 100644 --- a/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java +++ b/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java @@ -48,7 +48,7 @@ public class ResetLockedAccount extends SvrProcess { if (!user.isLocked()) throw new AdempiereException(Msg.getMsg(getCtx(), "UserIsNotLocked", new Object[] {user.getName()})); - StringBuilder sql = new StringBuilder ("UPDATE AD_User SET IsLocked = 'N', DateAccountLocked=NULL, FailedLoginCount=0, Updated=SysDate ") + StringBuilder sql = new StringBuilder ("UPDATE AD_User SET IsLocked = 'N', DateAccountLocked=NULL, FailedLoginCount=0, DateLastLogin=NULL, Updated=SysDate ") .append(" WHERE IsLocked='Y' AND AD_Client_ID = ? ") .append(" AND DateAccountLocked IS NOT NULL ") .append(" AND AD_User_ID = " + user.getAD_User_ID()); @@ -64,7 +64,7 @@ public class ResetLockedAccount extends SvrProcess { int MAX_ACCOUNT_LOCK_MINUTES = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_ACCOUNT_LOCK_MINUTES, 0); int MAX_INACTIVE_PERIOD = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_INACTIVE_PERIOD_DAY, 0); - StringBuilder sql = new StringBuilder("UPDATE AD_User SET IsLocked = 'N', DateAccountLocked=NULL, FailedLoginCount=0, Updated=SysDate ") + StringBuilder sql = new StringBuilder("UPDATE AD_User SET IsLocked = 'N', DateAccountLocked=NULL, FailedLoginCount=0, DateLastLogin=NULL, Updated=SysDate ") .append(" WHERE IsLocked='Y' AND AD_Client_ID = ? ") .append(" AND DateAccountLocked IS NOT NULL");