IDEMPIERE-2013 Impossible to empty EMail field on User window

This commit is contained in:
Nicolas Micoud 2014-06-25 09:12:54 -05:00
parent 224e163005
commit 02c221db86
1 changed files with 2 additions and 1 deletions

View File

@ -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;