From 02c221db86ea19c6b5baba432c63aa9d60d5b2ef Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Wed, 25 Jun 2014 09:12:54 -0500 Subject: [PATCH] IDEMPIERE-2013 Impossible to empty EMail field on User window --- org.adempiere.base/src/org/compiere/model/MUser.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/MUser.java b/org.adempiere.base/src/org/compiere/model/MUser.java index fc1518a3d4..fcaf233e92 100644 --- a/org.adempiere.base/src/org/compiere/model/MUser.java +++ b/org.adempiere.base/src/org/compiere/model/MUser.java @@ -42,6 +42,7 @@ import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.Secure; import org.compiere.util.SecureEngine; +import org.compiere.util.Util; /** * User Model @@ -899,7 +900,7 @@ public class MUser extends X_AD_User setEMailVerifyDate(null); // IDEMPIERE-1409 - if (getEMail() != null && (newRecord || is_ValueChanged("EMail"))) { + if (!Util.isEmpty(getEMail()) && (newRecord || is_ValueChanged("EMail"))) { if (! EMail.validate(getEMail())) { log.saveError("SaveError", Msg.getMsg(getCtx(), "InvalidEMailFormat") + Msg.getElement(getCtx(), COLUMNNAME_EMail) + " - [" + getEMail() + "]"); return false;