IDEMPIERE-5857 Cross tenant on Reset Password (#2015)
* IDEMPIERE-5857 Cross tenant on Reset Password * - Change logic following suggestion from Heng Sin
This commit is contained in:
parent
7c486df524
commit
93c275722c
|
@ -42,6 +42,7 @@ import org.compiere.model.MPasswordHistory;
|
||||||
import org.compiere.model.MPasswordRule;
|
import org.compiere.model.MPasswordRule;
|
||||||
import org.compiere.model.MSysConfig;
|
import org.compiere.model.MSysConfig;
|
||||||
import org.compiere.model.MUser;
|
import org.compiere.model.MUser;
|
||||||
|
import org.compiere.model.PO;
|
||||||
import org.compiere.model.SystemIDs;
|
import org.compiere.model.SystemIDs;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DisplayType;
|
import org.compiere.util.DisplayType;
|
||||||
|
@ -392,10 +393,11 @@ public class WResetPassword implements IFormController, EventListener<Event>, Va
|
||||||
user.setIsExpired(true);
|
user.setIsExpired(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
user.saveEx();
|
if (user.getAD_Client_ID() == 0 && Env.getAD_Client_ID(Env.getCtx()) != 0)
|
||||||
}
|
user.saveCrossTenantSafeEx();
|
||||||
catch(AdempiereException e)
|
else
|
||||||
{
|
user.saveEx();
|
||||||
|
} catch(AdempiereException e) {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
clearForm();
|
clearForm();
|
||||||
|
|
Loading…
Reference in New Issue