예제 #1
0
 public function insertAction()
 {
     $form = new User_Form_Save();
     if ($this->getRequest()->isPost()) {
         if ($form->isValid($_POST)) {
             $this->userService = new User_Service_Staffmembre();
             $user = new User_Model_Staffmembre();
             $user->setFirstname($form->getValue('firstname'));
             $user->setLastname($form->getValue('lastname'));
             $user->setEmail($form->getValue('email'));
             $user->setLogin($form->getValue('login'));
             $user->setPassword($form->getValue('password'));
             $user->setTeam($form->getValue('team'));
             $this->userService->save($user);
             $this->_redirector->gotoUrl('/user/list');
         }
     }
     $this->view->saveForm = $form;
 }