mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIx #18304 No adh create if error on public form
FIX #18304 - Member subscription confirmation email sent even if mandatory fields are missing
This commit is contained in:
parent
eeaa4f8205
commit
cd2b9538c1
|
|
@ -279,7 +279,10 @@ if ($action == 'add')
|
|||
$ret = $extrafields->setOptionalsFromPost(null, $adh);
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
$result = $adh->create($user);
|
||||
if (empty($error)) {
|
||||
$result = $adh->create($user);
|
||||
}
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user