From c06e8f725ecb1f9543d1ee7fb4be61c2846f619b Mon Sep 17 00:00:00 2001 From: MatteoPistorello Date: Wed, 9 Feb 2022 11:48:01 +0100 Subject: [PATCH] Fix aggiunta referente --- plugins/referenti/actions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/referenti/actions.php b/plugins/referenti/actions.php index d007d5da9..17befdf59 100755 --- a/plugins/referenti/actions.php +++ b/plugins/referenti/actions.php @@ -24,6 +24,8 @@ $operazione = filter('op'); switch ($operazione) { case 'addreferente': if (!empty(post('nome'))) { + $opt_out_newsletter = post('disable_newsletter'); + $dbo->insert('an_referenti', [ 'idanagrafica' => $id_parent, 'nome' => post('nome'), @@ -31,6 +33,7 @@ switch ($operazione) { 'telefono' => post('telefono'), 'email' => post('email'), 'idsede' => post('idsede'), + 'enable_newsletter' => empty($opt_out_newsletter), ]); $id_record = $dbo->lastInsertedID(); @@ -55,7 +58,6 @@ switch ($operazione) { 'telefono' => post('telefono'), 'email' => post('email'), 'idsede' => post('idsede'), - 'enable_newsletter' => empty($opt_out_newsletter), ], ['id' => $id_record]);