1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
public function ajouterAction()
{ $this->_helper->layout->disableLayout();
$form = new Application_Form_AjoutUser();
$form->submit->setLabel('Add');
$this->view->formUser = $form;
if ($this->getRequest()->isPost()) {
$formData = $this->getRequest()->getPost();
if ($form->isValid($formData)) {
$nom = $form->getValue('nom');
$genre= $form->getValue('genre');
$username = $form->getValue('username');
$password= $form->getValue('password');
$email= $form->getValue('email');
$tel = $form->getValue('tel');
$societe = $form->getValue('societe');
$position = $form->getValue('position');
$type_user= $form->getValue('type_user');
$groupe_liste = $form->getValue('group');
$active = $form->getValue('active');
$date = $form->getValue('date');
$utilisateur = new Application_Model_DbTable_Utilisateur ();
$utilisateur->addUtilisateur($nom,$genre,$username,$password,$email,$tel,$societe,$position,$groupe_liste,$type_user,$active,$date);
$this->_helper->redirector('index');
} else {
$form->populate($formData);
}
}
} |
Partager