예제 #1
0
 function display($save = '', $pt = 0)
 {
     //trigger event
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeProfileTypeSelection');
     // 	check for session
     //  if does not exist redirect user to community page
     XiptHelperProfiletypes::checkSessionForProfileType();
     //If not allowed to select PT for user then return
     if (XiptFactory::getSettings('show_ptype_during_reg') == 0) {
         $selectedProfiletypeID = XiptLibProfiletypes::getDefaultProfiletype();
         XiptHelperProfiletypes::setProfileTypeInSession($selectedProfiletypeID);
     }
     // do some validation for visibility and publish of ptype
     if (JRequest::getVar('save', $save, 'POST') != '') {
         $selectedProfiletypeID = JRequest::getVar('profiletypes', $pt, 'POST');
         if (XiptLibProfiletypes::validateProfiletype($selectedProfiletypeID, array('published' => 1, 'visible' => 1)) == false) {
             $msg = XiptText::_('INVALID_PROFILE_TYPE_SELECTED');
             $link = XiptRoute::_('index.php?option=com_xipt&view=registration', false);
             $this->setRedirect($link, $msg);
         }
         $dispatcher->trigger('onAfterProfileTypeSelection', array(&$selectedProfiletypeID));
         return true;
     }
     // Get the view
     $this->getView()->display();
 }
예제 #2
0
 function onAfterProfileTypeSelection($ptypeid)
 {
     // set the profile type in session
     return XiptHelperProfiletypes::setProfileTypeInSession($ptypeid);
 }