예제 #1
0
 public function profileAction()
 {
     $proxy = new SxCms_Page_Proxy();
     $this->view->page = $proxy->getPageById('29', null, $this->_getParam('lng', 'nl'));
     //enable groups if they can choose them
     /*
     $proxy = new SxModule_Securedocs_Group_Proxy();
     $groups = $proxy->getAll();
     $this->view->groups = $groups;
     */
     $identity = Zend_Auth::getInstance()->getIdentity();
     $proxy = new SxModule_Members_Proxy();
     $item = $proxy->getById($identity->getId());
     if ($this->getRequest()->isPost()) {
         $item->setActive($this->_getParam('active'));
         $item->setLng($_SESSION['System']['lng']);
         //$this->_getParam('language')
         $item->setSex($this->_getParam('sex'));
         $item->setName($this->_getParam('name'));
         $item->setFirstName($this->_getParam('firstname'));
         $item->setCompany($this->_getParam('company'));
         $item->setWebsite($this->_getParam('website'));
         $item->setEmail($this->_getParam('email'));
         $item->setPassword($this->_getParam('password'));
         $item->setPhone($this->_getParam('phone'));
         $item->setFax($this->_getParam('fax'));
         $item->setMobilePhone($this->_getParam('mobilephone'));
         $item->setStreet($this->_getParam('street'));
         $item->setNumber($this->_getParam('number'));
         $item->setPostalcode($this->_getParam('postalcode'));
         $item->setPlace($this->_getParam('place'));
         $item->setCountry($this->_getParam('country'));
         $item->setBoardMember($this->_getParam('boardmember'));
         $item->setGroups($this->_getParam('groups'));
         //groups = array;
         /* validate post */
         if ($item->isValid()) {
             $item->save();
             $item->sendToAdmin();
             $this->view->success = "Aanpassingen succesvol opgeslagen";
         }
     }
     $this->view->messages = Sanmax_MessageStack::getInstance('SxModule_Members');
     $this->view->item = $item;
 }
예제 #2
0
 public function activateAction()
 {
     SxCms_Acl::requireAcl('members', 'members.activate');
     $proxy = new SxModule_Members_Proxy();
     $item = $proxy->getById((int) $this->_getParam('id'), $_SESSION['System']['lng']);
     $item->activate();
     $flashMessenger = $this->_helper->getHelper('FlashMessenger');
     $flashMessenger->addMessage($this->admin_tmx->_('memberstatusedited'));
     $this->_helper->redirector->gotoSimple('index', 'member');
 }