IDEMPIERE-1800 Reset Locked Account shows all clients
This commit is contained in:
parent
cfb0c7c6e7
commit
331f1a78c6
|
@ -0,0 +1,11 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- Mar 1, 2018 10:02:34 AM CET
|
||||
-- IDEMPIERE-1298 2Pack: Support copying of data from one client to another
|
||||
UPDATE AD_Val_Rule SET Code='AD_User.AD_Client_ID=@#AD_Client_ID@ AND AD_User.IsLocked=''Y''',Updated=TO_DATE('2018-03-01 10:02:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200067
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201803011003_IDEMPIERE-1800.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
-- Mar 1, 2018 10:02:34 AM CET
|
||||
-- IDEMPIERE-1298 2Pack: Support copying of data from one client to another
|
||||
UPDATE AD_Val_Rule SET Code='AD_User.AD_Client_ID=@#AD_Client_ID@ AND AD_User.IsLocked=''Y''',Updated=TO_TIMESTAMP('2018-03-01 10:02:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200067
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201803011003_IDEMPIERE-1800.sql') FROM dual
|
||||
;
|
||||
|
|
@ -50,7 +50,6 @@ public class ResetLockedAccount extends SvrProcess {
|
|||
|
||||
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());
|
||||
int no = DB.executeUpdate(sql.toString(), new Object[] { p_AD_Client_ID }, false, get_TrxName());
|
||||
if (no <= 0)
|
||||
|
@ -65,8 +64,7 @@ public class ResetLockedAccount extends SvrProcess {
|
|||
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, DateLastLogin=NULL, Updated=SysDate ")
|
||||
.append(" WHERE IsLocked='Y' AND AD_Client_ID = ? ")
|
||||
.append(" AND DateAccountLocked IS NOT NULL");
|
||||
.append(" WHERE IsLocked='Y' AND AD_Client_ID = ? ");
|
||||
|
||||
if (DB.isPostgreSQL())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue