$adh->morphy = $_POST["morphy"]; $adh->naiss = $birthday; foreach($_POST as $key => $value){ if (preg_match("/^options_/",$key)){ $adh->array_options[$key]=$_POST[$key]; } } $result=$adh->create($user->id); if ($result > 0) { // Send email to say it has been created and will be validated soon... if (! empty($conf->global->ADHERENT_AUTOREGISTER_MAIL) && ! empty($conf->global->ADHERENT_AUTOREGISTER_MAIL_SUBJECT)) { $result=$adh->send_an_email($conf->global->ADHERENT_AUTOREGISTER_MAIL,$conf->global->ADHERENT_AUTOREGISTER_MAIL_SUBJECT,array(),array(),array(),"","",0,-1); } if ($backtopage) $urlback=$backtopage; else if ($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION) { $urlback=$conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION; // TODO Make replacement of __AMOUNT__, etc... } else $urlback=$_SERVER["PHP_SELF"]."?action=added"; if (! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)) { if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paybox') { $urlback=DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=membernewform&source=membersubscription&ref='.$adh->ref;