Exemplo n.º 1
0
 public function addAction()
 {
     $this->view->pageTitle = $this->translate('user_add_headline');
     $this->view->form = new User_Form_EditUser(array(), true);
     $req = $this->getRequest();
     if ($req->isPost()) {
         // there are profile updates
         if ($this->view->form->isValid($_POST)) {
             $values = $this->view->form->getValues();
             $u = new User_Model_User();
             $u->updateProfile($values);
             $this->session->message = $this->translate('user_admin_add_success');
             $this->_helper->redirector->gotoSimple('index', 'admin', 'user');
         } else {
             $this->view->message = $this->translate('user_admin_add_failed');
         }
     }
 }