$lAdherent->setCourrielSecondaire(trim($lCourrielS)); $lAdherent->setTelephonePrincipal(trim($lTelephoneP)); $lAdherent->setTelephoneSecondaire(trim($lTelephoneS)); $lAdherent->setAdresse(trim($lAdresse)); $lAdherent->setCodePostal(trim($lCodePostal)); $lAdherent->setVille(StringUtils::formaterVille(trim($lVille))); $lAdherent->setDateNaissance($lDateNaissance); $lAdherent->setDateAdhesion($lDateAdhesion); $lAdherent->setDateMaj(StringUtils::dateTimeAujourdhuiDb()); $lAdherent->setCommentaire(trim($lCommentaire)); $lAdherent->setEtat(1); // Protection des dates vides if ($lAdherent->getDateNaissance() == '') { $lAdherent->setDateNaissance(StringUtils::FORMAT_DATE_NULLE); } $lRequete = "INSERT INTO " . AdherentManager::TABLE_ADHERENT . "\n\t\t\t\t\t\t\t(" . AdherentManager::CHAMP_ADHERENT_ID . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_NUMERO . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_ID_COMPTE . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_NOM . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_PRENOM . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_COURRIEL_PRINCIPAL . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_COURRIEL_SECONDAIRE . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_TELEPHONE_PRINCIPAL . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_TELEPHONE_SECONDAIRE . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_ADRESSE . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_CODE_POSTAL . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_VILLE . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_DATE_NAISSANCE . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_DATE_ADHESION . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_DATE_MAJ . "\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_COMMENTAIRE . "\t\t\t\t\n\t\t\t\t\t\t\t," . AdherentManager::CHAMP_ADHERENT_ETAT . ")\n\t\t\t\t\t\t\tVALUES (NULL\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getNumero()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getIdCompte()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getNom()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getPrenom()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getCourrielPrincipal()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getCourrielSecondaire()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getTelephonePrincipal()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getTelephoneSecondaire()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getAdresse()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getCodePostal()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getVille()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getDateNaissance()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getDateAdhesion()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getDateMaj()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getCommentaire()) . "'\n\t\t\t\t\t\t\t\t,'" . StringUtils::securiser($lAdherent->getEtat()) . "')"; $lId = Dbutils::executerRequeteInsertRetourId($lRequete); // Execution de la requete et récupération de l'Id généré par la BDD // Les modules autorisés des adhérents $lAutorisation = new AutorisationVO(); $lAutorisation->setIdAdherent($lId); $lAutorisation->setIdModule(1); AutorisationManager::insert($lAutorisation); $lAutorisation = new AutorisationVO(); $lAutorisation->setIdAdherent($lId); $lAutorisation->setIdModule(3); AutorisationManager::insert($lAutorisation); // Insertion des informations de connexion $lMdp = MotDePasseUtils::generer(); $lIdentification = new IdentificationVO(); $lIdentification->setIdLogin($lId);