_stateMachine = &$stateMachine; } /** * Returns the user to the top of the user context stack. */ public function popUserContext() { $session = CRM_Core_Session::singleton(); $config = CRM_Core_Config::singleton(); // check if destination is set, if so goto destination $destination = $this->_stateMachine->getDestination(); if ($destination) { $destination = urldecode($destination); } else { $destination = $session->popUserContext(); if (empty($destination)) { $destination = $config->userFrameworkBaseURL; } } //CRM-5839 -do not redirect control. if (!$this->_stateMachine->getSkipRedirection()) { CRM_Utils_System::redirect($destination); } } }