From cda078ce266c21666e930ef6c68929f3e5d14645 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 10 Jan 2018 12:27:11 +0100 Subject: [PATCH] Fix test on email unique --- htdocs/societe/class/societe.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 9f8c57d145f..34724c844d5 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -698,11 +698,12 @@ class Societe extends CommonObject } else { + //var_dump($conf->global->SOCIETE_EMAIL_UNIQUE); //var_dump($conf->global->SOCIETE_EMAIL_MANDATORY); if ($key == 'EMAIL') { // Check for unicity - if ($vallabel) + if ($vallabel && ! empty($conf->global->SOCIETE_EMAIL_UNIQUE)) { if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) {