Пример #1
0
 public function buildUserNavigation()
 {
     $user = new GUser();
     $this->navigation = new Navigation();
     $userPages = $user->getMyAccountControls();
     $subUserPages = $this->subUserobject->getMyAccountControls();
     //$userPages[0]['pages'] = $subUserPages;
     $this->navigation->addPages(array_merge($userPages, $subUserPages));
 }
Пример #2
0
 public function performaddAction()
 {
     $typeSelected = $this->params()->fromPost('TIPO');
     $request = $this->getRequest();
     $form = new UserForm();
     if ($request->isPost()) {
         $user = new GUser();
         echo $typeSelected;
         $subUser = LocalUserFactory::getUser($typeSelected);
         //$form->setInputFilter($user->getInputFilter());
         //$form->setInputFilter($subUser->getInputFilter());
         $form->setData($request->getPost());
         if ($form->isValid()) {
             $user->exchangeArray($form->getData());
             $subUser->exchangeArray($request->getPost('subForm'));
             // Hash password
             $this->hashUserPassword($user);
             $this->startTransactionAddUser($user, $subUser, true);
             // Redirect to list of users
             $this->addInfoMessage(GeneralMessages::USER_ADD_OK);
             return $this->redirect()->toRoute('user');
         } else {
             $this->addErrorMessage(GeneralMessages::FORM_ERROR);
             return $this->redirect()->toRoute('user', array('action' => 'add'));
         }
     }
 }
Пример #3
0
 public static function getTableIO($adapter)
 {
     return new GUserTable(GUser::getTableGateway($adapter));
 }