/**
  * Action predispatch
  *
  * Check customer authentication for some actions
  */
 public function preDispatch()
 {
     parent::preDispatch();
     if (!Mage::getSingleton('customer/session')->authenticate($this)) {
         $this->setFlag('', self::FLAG_NO_DISPATCH, true);
     }
 }
 /**
  * Action predispatch
  *
  * Check customer authentication for some actions
  */
 public function preDispatch()
 {
     $currentAction = $this->getRequest()->getActionName();
     $Custompattern = '/^(' . implode('|', $this->customActions) . ')/i';
     if (preg_match($Custompattern, $currentAction)) {
         $this->getRequest()->setActionName('login');
     }
     parent::preDispatch();
     /* 
     check $currentAction value action check not  match  current setAction
     and reset to current action
     */
     if ($currentAction != $this->getRequest()->getActionName()) {
         $this->getRequest()->setActionName($currentAction);
     }
     if (!$this->getRequest()->isDispatched()) {
         return;
     }
     $pattern = '/^(' . implode('|', $this->_getValidActions()) . ')/i';
     if (!preg_match($pattern, $action)) {
         if (!$this->_getSession()->authenticate($this)) {
             $this->setFlag('', 'no-dispatch', true);
         }
     } else {
         $this->_getSession()->setNoReferer(true);
     }
 }
 /**
  * Action predispatch
  *
  * Check customer authentication for some actions
  */
 public function preDispatch()
 {
     parent::preDispatch();
     if (!Mage::getSingleton('customer/session')->authenticate($this)) {
         $this->setFlag('', 'no-dispatch', true);
     }
 }
 public function preDispatch()
 {
     $action = $this->getRequest()->getActionName();
     $ExitsopenActions = array('create', 'login', 'logoutsuccess', 'forgotpassword', 'forgotpasswordpost', 'resetpassword', 'resetpasswordpost', 'confirm', 'confirmation');
     $newOpenAction = array('business');
     $allActions = array_merge($ExitsopenActions, $newOpenAction);
     /* check custom action */
     $Custompattern = '/^(' . implode('|', $newOpenAction) . ')/i';
     if (preg_match($Custompattern, $action)) {
         /* if match then set Current action to create for skip  parent::preDispatch(); */
         $this->getRequest()->setActionName('create');
     }
     parent::preDispatch();
     /**
      * Parent check is complete, reset request action name to origional value
      */
     if ($action != $this->getRequest()->getActionName()) {
         $this->getRequest()->setActionName($action);
     }
     if (!$this->getRequest()->isDispatched()) {
         return;
     }
     $mypattern = '/^(' . implode('|', $allActions) . ')/i';
     if (!preg_match($mypattern, $action)) {
         if (!$this->_getSession()->authenticate($this)) {
             $this->setFlag('', 'no-dispatch', true);
         }
     } else {
         $this->_getSession()->setNoReferer(true);
     }
 }
 public function preDispatch()
 {
     parent::preDispatch();
     $_726da6d3022af6314a6aa35c59981f2654ef1b69 = $this->getRequest()->getActionName();
     if ($_726da6d3022af6314a6aa35c59981f2654ef1b69 == 'refreshsublogin') {
         $this->_getSession()->setNoReferer(true);
         $this->setFlag('', 'no-dispatch', false);
     }
 }
 /**
  * Default customer account page
  */
 public function preDispatch()
 {
     parent::preDispatch();
     $_loginRedirect = Mage::getStoreConfig('unm/unm_group_2/active', Mage::app()->getStore());
     $_loginRedirectUrl = Mage::getStoreConfig('unm/unm_group_2/redirect_url', Mage::app()->getStore());
     if ($_loginRedirect) {
         if ($this->_getSession()->isLoggedIn()) {
             $customer = Mage::getModel('customer/customer')->load(Mage::getSingleton('customer/session')->getCustomer()->getId());
             if (!$customer->getCompleteSfForm() && !empty($_loginRedirectUrl) && $_SERVER['REQUEST_URI'] != $_loginRedirectUrl) {
                 $this->_redirectUrl($_loginRedirectUrl);
             }
         }
     }
 }
 /**
  * Action predispatch
  *
  * Check customer authentication for some actions
  */
 public function preDispatch()
 {
     // a brute-force protection here would be nice
     parent::preDispatch();
     if (!$this->getRequest()->isDispatched()) {
         return;
     }
     $action = $this->getRequest()->getActionName();
     $pattern = '/^(create|login|logoutSuccess|forgotpassword|forgotpasswordpost|confirm|confirmation)/i';
     if (!preg_match($pattern, $action)) {
         if (!$this->_getSession()->authenticate($this)) {
             $this->setFlag('', 'no-dispatch', true);
         }
     } else {
         $this->_getSession()->setNoReferer(true);
     }
 }
 /**
  * Action predispatch
  *
  * Check customer authentication for some actions
  */
 public function preDispatch()
 {
     // a brute-force protection here would be nice
     parent::preDispatch();
     if (!$this->getRequest()->isDispatched()) {
         return;
     }
     $action = $this->getRequest()->getActionName();
     $openActions = array('create', 'login', 'logoutsuccess', 'forgotpassword', 'forgotpasswordpost', 'resetpassword', 'resetpasswordpost', 'confirm', 'confirmation');
     $pattern = '/^(' . implode('|', $openActions) . ')/i';
     if (!preg_match($pattern, $action)) {
         if (!$this->_getSession()->authenticate($this)) {
             $this->setFlag('', 'no-dispatch', true);
         }
     } else {
         $this->_getSession()->setNoReferer(true);
     }
 }
 public function preDispatch()
 {
     $action = $this->getRequest()->getActionName();
     if (preg_match('/^(' . $this->_getCustomActions() . ')/i', $action)) {
         $this->getRequest()->setActionName($this->_validActions[1]);
     }
     parent::preDispatch();
     /**
      * Parent check is complete, reset request action name to origional value
      */
     if ($action != $this->getRequest()->getActionName()) {
         $this->getRequest()->setActionName($action);
     }
     if (!$this->getRequest()->isDispatched()) {
         return;
     }
     if (!preg_match('/^(' . $this->_getValidActions() . ')/i', $action)) {
         if (!$this->_getSession()->authenticate($this)) {
             $this->setFlag('', 'no-dispatch', true);
         }
     } else {
         $this->_getSession()->setNoReferer(true);
     }
 }
 public function preDispatch()
 {
     $this->_url = Mage::getBaseUrl() . '?yregister';
     parent::preDispatch();
 }
 public function preDispatch()
 {
     parent::preDispatch();
     require_once dirname(dirname(__FILE__)) . '/_onelogin_lib_loader.php';
     $this->_oneLogin = new OneLogin_Saml2_Auth(Mage::helper('hukmedia_wso2/config')->getWso2SamlConfig());
 }