public function initialize() { $feUserObj = EidUtility::initFeUser(); $pageId = GeneralUtility::_GET('id') ?: 1; /** @var TypoScriptFrontendController $typoScriptFrontendController */ $typoScriptFrontendController = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], $pageId, 0, TRUE); $GLOBALS['TSFE'] = $typoScriptFrontendController; $typoScriptFrontendController->connectToDB(); $typoScriptFrontendController->fe_user = $feUserObj; $typoScriptFrontendController->id = 2653; $typoScriptFrontendController->determineId(); $typoScriptFrontendController->getCompressedTCarray(); $typoScriptFrontendController->initTemplate(); $typoScriptFrontendController->getConfigArray(); $typoScriptFrontendController->includeTCA(); /** @var TypoScriptService $typoScriptService */ $typoScriptService = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Service\\TypoScriptService'); $pluginTyposcript = $typoScriptFrontendController->tmpl->setup['plugin.'][$this->extensionConfiguration['extensionKey'] . '.']; $this->pluginConfiguration = $typoScriptService->convertTypoScriptArrayToPlainArray($pluginTyposcript); // Set configuration to call the plugin $extensionConfiguration['settings'] = $this->pluginConfiguration['settings']; $extensionConfiguration['persistence'] = $this->pluginConfiguration['persistence']; $this->extensionConfiguration = array_merge($extensionConfiguration, $this->extensionConfiguration); $this->bootstrap = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Core\\Bootstrap'); $this->bootstrap->initialize($this->extensionConfiguration); }
/** * Initialize frontend environment */ public function __construct() { if (empty($_POST['tx_ajaxexample_piexample']['action'])) { $_POST['tx_ajaxexample_piexample']['action'] = 'hello'; } $_POST['tx_ajaxexample_piexample']['controller'] = 'Example'; $this->bootstrap = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Core\\Bootstrap'); $feUserObj = EidUtility::initFeUser(); $pageId = GeneralUtility::_GET('id') ?: 1; /** @var TypoScriptFrontendController $typoScriptFrontendController */ $typoScriptFrontendController = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], $pageId, 0, TRUE); $GLOBALS['TSFE'] = $typoScriptFrontendController; $typoScriptFrontendController->connectToDB(); $typoScriptFrontendController->fe_user = $feUserObj; $typoScriptFrontendController->id = $pageId; $typoScriptFrontendController->determineId(); $typoScriptFrontendController->getCompressedTCarray(); $typoScriptFrontendController->initTemplate(); $typoScriptFrontendController->getConfigArray(); $typoScriptFrontendController->includeTCA(); /** @var TypoScriptService $typoScriptService */ $typoScriptService = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Service\\TypoScriptService'); $pluginConfiguration = $typoScriptService->convertTypoScriptArrayToPlainArray($typoScriptFrontendController->tmpl->setup['plugin.']['tx_ajaxexample.']); // Set configuration to call the plugin $this->pluginConfiguration = array('pluginName' => 'PiExample', 'vendorName' => 'Helhum', 'extensionName' => 'AjaxExample', 'controller' => 'Example', 'action' => $_POST['tx_ajaxexample_piexample']['action'], 'mvc' => array('requestHandlers' => array('TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler' => 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler')), 'settings' => $pluginConfiguration['settings'], 'persistence' => array('storagePid' => $pluginConfiguration['persistence']['storagePid'])); }
/** * Initialize the TSFE. * * @param integer $pageUid The page UID * @param boolean $overrule * @return void */ public function initTSFE($pageUid = -1, $overrule = FALSE) { $rootLine = NULL; $typo3confVariables = $GLOBALS['TYPO3_CONF_VARS']; if ($pageUid == -1 && GeneralUtility::_GP('pid') !== NULL) { $pageUid = intval(GeneralUtility::_GP('pid')); } if ($pageUid === -1) { $pageUid = 0; } // begin if (!is_object($GLOBALS['TT']) || $overrule === TRUE) { $GLOBALS['TT'] = new \TYPO3\CMS\Core\TimeTracker\TimeTracker(); $GLOBALS['TT']->start(); } if ((!is_object($GLOBALS['TSFE']) || $GLOBALS['TSFE'] instanceof \stdClass || $overrule === TRUE) && is_int($pageUid)) { // builds TSFE object $GLOBALS['TSFE'] = $typoScriptFrontendController = new \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController($typo3confVariables, $pageUid, 0, 0, '', '', '', ''); $typoScriptFrontendController->initTemplate(); // builds a cObj if (is_array($typoScriptFrontendController->page) === FALSE) { $typoScriptFrontendController->page = array(); } $typoScriptFrontendController->newCObj(); // Add the FE user $typoScriptFrontendController->fe_user = EidUtility::initFeUser(); $typoScriptFrontendController->determineId(); $typoScriptFrontendController->getConfigArray(); $this->setRequestedLanguage($typoScriptFrontendController); $typoScriptFrontendController->settingLanguage(); $typoScriptFrontendController->settingLocale(); } }
/** * @return FrontendUserAuthentication */ protected function getFrontendUserAuthentication() { if ($this->frontendUserAuthentication === null) { if ($this->getTypoScriptFrontendController() !== null) { $this->frontendUserAuthentication = $this->getTypoScriptFrontendController()->fe_user; } else { $this->frontendUserAuthentication = EidUtility::initFeUser(); } } return $this->frontendUserAuthentication; }
/** * Processes eID request. * * @return void */ public function main() { // Due to the nature of OpenID (redrections, etc) we need to force user // session fetching if there is no session around. This ensures that // our service is called even if there is no login data in the request. // Inside the service we will process OpenID response and authenticate // the user. $GLOBALS['TYPO3_CONF_VARS']['SVCONF']['auth']['FE_fetchUserIfNoSession'] = TRUE; // Initialize Frontend user \TYPO3\CMS\Frontend\Utility\EidUtility::connectDB(); \TYPO3\CMS\Frontend\Utility\EidUtility::initFeUser(); // Redirect to the original location in any case (authenticated or not) @ob_end_clean(); \TYPO3\CMS\Core\Utility\HttpUtility::redirect(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tx_openid_location'), \TYPO3\CMS\Core\Utility\HttpUtility::HTTP_STATUS_303); }
/** * Check FE Session * * @return bool */ public function render() { // settings $userObj = EidUtility::initFeUser(); $GLOBALS['TSFE'] = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], GeneralUtility::_GET('id'), 0, true); $GLOBALS['TSFE']->fe_user = $userObj; // random value for session storing $value = md5(time()); // store in session $GLOBALS['TSFE']->fe_user->setKey('ses', $this->sessionKey, $value); $GLOBALS['TSFE']->storeSessionData(); if ($GLOBALS['TSFE']->fe_user->getKey('ses', $this->sessionKey) === $value) { return true; } return false; }
/** * Initialize Extbase * * @param array $typo3ConfVars */ public function __construct($typo3ConfVars) { $this->configuration = ['pluginName' => 'Pi2', 'vendorName' => 'Gigabonus', 'extensionName' => 'Gbfemanager', 'controller' => 'Validation', 'action' => 'validate']; $_POST['tx_gbpartner_categorylisting']['action'] = 'validate'; $_POST['tx_gbpartner_categorylisting']['controller'] = 'Validation'; $this->bootstrap = new Bootstrap(); $userObj = EidUtility::initFeUser(); $pid = GeneralUtility::_GP('id') ? GeneralUtility::_GP('id') : 1; $GLOBALS['TSFE'] = GeneralUtility::makeInstance(TypoScriptFrontendController::class, $typo3ConfVars, $pid, 0, true); $GLOBALS['TSFE']->connectToDB(); $GLOBALS['TSFE']->fe_user = $userObj; $GLOBALS['TSFE']->id = $pid; $GLOBALS['TSFE']->determineId(); $GLOBALS['TSFE']->initTemplate(); $GLOBALS['TSFE']->getConfigArray(); }
/** * Initialize Extbase * * @param array $typo3ConfVars */ public function __construct($typo3ConfVars) { $this->configuration = ['pluginName' => 'Pi1', 'vendorName' => 'In2code', 'extensionName' => 'Femanager', 'controller' => 'User', 'action' => 'fileDelete', 'mvc' => ['requestHandlers' => ['TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler' => 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler']], 'settings' => []]; $_POST['tx_femanager_pi1']['action'] = 'fileDelete'; $_POST['tx_femanager_pi1']['controller'] = 'User'; $this->bootstrap = new Bootstrap(); $userObj = EidUtility::initFeUser(); $pid = GeneralUtility::_GET('id') ? GeneralUtility::_GET('id') : 1; $GLOBALS['TSFE'] = GeneralUtility::makeInstance(TypoScriptFrontendController::class, $typo3ConfVars, $pid, 0, true); $GLOBALS['TSFE']->connectToDB(); $GLOBALS['TSFE']->fe_user = $userObj; $GLOBALS['TSFE']->id = $pid; $GLOBALS['TSFE']->determineId(); $GLOBALS['TSFE']->initTemplate(); $GLOBALS['TSFE']->getConfigArray(); }
/** * Initialize Extbase * * @param array $TYPO3_CONF_VARS */ public function __construct($TYPO3_CONF_VARS) { $this->configuration = array('pluginName' => 'Pi1', 'vendorName' => 'In2', 'extensionName' => 'Femanager', 'controller' => 'User', 'action' => 'fileUpload', 'mvc' => array('requestHandlers' => array('TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler' => 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler')), 'settings' => array()); $_POST['tx_femanager_pi1']['action'] = 'fileUpload'; $_POST['tx_femanager_pi1']['controller'] = 'User'; $this->bootstrap = new Bootstrap(); $userObj = EidUtility::initFeUser(); $pid = GeneralUtility::_GET('id') ? GeneralUtility::_GET('id') : 1; $GLOBALS['TSFE'] = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', $TYPO3_CONF_VARS, $pid, 0, TRUE); $GLOBALS['TSFE']->connectToDB(); $GLOBALS['TSFE']->fe_user = $userObj; $GLOBALS['TSFE']->id = $pid; $GLOBALS['TSFE']->determineId(); $GLOBALS['TSFE']->initTemplate(); $GLOBALS['TSFE']->getConfigArray(); }
/** * Initialize Extbase * * @param \array $TYPO3_CONF_VARS The global array. Will be set internally */ public function __construct($TYPO3_CONF_VARS) { $this->configuration = array('pluginName' => 'Pi1', 'vendorName' => 'In2code', 'extensionName' => 'Powermail', 'controller' => 'Form', 'action' => 'validateAjax', 'mvc' => array('requestHandlers' => array('TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler' => 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler')), 'settings' => array()); $_POST['tx_powermail_pi1']['action'] = 'validateAjax'; $_POST['tx_powermail_pi1']['controller'] = 'Form'; $this->bootstrap = new \TYPO3\CMS\Extbase\Core\Bootstrap(); $userObj = \TYPO3\CMS\Frontend\Utility\EidUtility::initFeUser(); $pid = GeneralUtility::_GET('id') ? GeneralUtility::_GET('id') : 1; $GLOBALS['TSFE'] = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', $TYPO3_CONF_VARS, $pid, 0, TRUE); $GLOBALS['TSFE']->connectToDB(); $GLOBALS['TSFE']->fe_user = $userObj; $GLOBALS['TSFE']->id = $pid; $GLOBALS['TSFE']->determineId(); $GLOBALS['TSFE']->getCompressedTCarray(); $GLOBALS['TSFE']->initTemplate(); $GLOBALS['TSFE']->getConfigArray(); $GLOBALS['TSFE']->includeTCA(); }
/** * Processes eID request. * * @return void */ public function main() { // Due to the nature of OpenID (redrections, etc) we need to force user // session fetching if there is no session around. This ensures that // our service is called even if there is no login data in the request. // Inside the service we will process OpenID response and authenticate // the user. $GLOBALS['TYPO3_CONF_VARS']['SVCONF']['auth']['FE_fetchUserIfNoSession'] = true; // Initialize Frontend user EidUtility::initFeUser(); // Redirect to the original location in any case (authenticated or not) @ob_end_clean(); $location = GeneralUtility::_GP('tx_openid_location'); $signature = GeneralUtility::hmac($location, 'openid'); if ($signature === GeneralUtility::_GP('tx_openid_location_signature')) { HttpUtility::redirect($location, HttpUtility::HTTP_STATUS_303); } }
function main() { # $this->initTSFE(); $reference = $_GET['reference']; $langKey = $_GET['lang']; $feUserObj = \TYPO3\CMS\Frontend\Utility\EidUtility::initFeUser(); // Initialize FE user object // tslib_eidtools::connectDB(); //Connect to database // ... #var_dump($feUserObj); if ($feUserObj->user === FALSE) { ##var_dump($feUserObj->user); return false; } else { $data = array(); $data['user'] = $feUserObj->user; $data['lang'] = $langKey; $data['time'] = date('c'); $url = 'http://www.tracepartsonline.net/ws/Winkel/reference.aspx?reference=' . $reference . '&r_country=' . $langKey . '&r_email=' . rawurlencode($feUserObj->user['email']) . '&r_phone=' . rawurlencode($feUserObj->user['telephone']) . '&r_name=' . rawurlencode($feUserObj->user['name']) . '&r_company=' . rawurlencode($feUserObj->user['company']); #$data['htmlCode'] = '<a href="' . $url. '" class="rollen fancyboxmin" data-feuser="******" ><img src="/fileadmin/template/images/cad.jpg"></a> <!-- TEST -->'; return json_encode($data); } }
/** * Initialise feUser */ protected function initializeUserAuthentication() { if ($this->feUser === null) { $this->feUser = \TYPO3\CMS\Frontend\Utility\EidUtility::initFeUser(); $this->feUser->fetchGroupData(); } }
/** * Initialize the TSFE. * * @param integer $pageUid The page UID * @param boolean $overrule * @return void */ public function initTSFE($pageUid = -1, $overrule = FALSE) { $rootLine = NULL; $typo3confVariables = $GLOBALS['TYPO3_CONF_VARS']; if ($pageUid == -1 && GeneralUtility::_GP('pid') !== NULL) { $pageUid = intval(GeneralUtility::_GP('pid')); } if ($pageUid === -1) { $pageUid = 0; } #$typo3confVariables['EXT']['extList'] = str_replace('tq_seo', '', $typo3confVariables['EXT']['extList']); #$typo3confVariables['EXT']['extList_FE'] = str_replace('tq_seo', '', $typo3confVariables['EXT']['extList_FE']); // declare //$temp_TSFEclassName = t3lib_div::makeInstance('tslib_fe'); // begin if (!is_object($GLOBALS['TT']) || $overrule === TRUE) { $GLOBALS['TT'] = new \TYPO3\CMS\Core\TimeTracker\TimeTracker(); $GLOBALS['TT']->start(); } if ((!is_object($GLOBALS['TSFE']) || $GLOBALS['TSFE'] instanceof \stdClass || $overrule === TRUE) && is_int($pageUid)) { // builds TSFE object $GLOBALS['TSFE'] = new \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController($typo3confVariables, $pageUid, 0, 0, '', '', '', ''); // $start = microtime(TRUE); // builds rootline if ($pageUid > 0) { $GLOBALS['TSFE']->sys_page = GeneralUtility::makeInstance('t3lib_pageSelect'); //$rootLine = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\RootlineUtility', 0, '', $this); /** @var RootlineUtility $rootLine */ $rootLineUtility = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\RootlineUtility', $pageUid); $rootLine = $rootLineUtility->get(); // $rootLine = $GLOBALS['TSFE']->sys_page->getRootLine($pageUid); $GLOBALS['TSFE']->rootLine = $rootLine; } // Init template $GLOBALS['TSFE']->tmpl = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\ExtendedTemplateService'); $GLOBALS['TSFE']->tmpl->tt_track = 0; // Do not log time-performance information $GLOBALS['TSFE']->tmpl->init(); // this generates the constants/config + hierarchy info for the template. if ($rootLine && $pageUid > 0) { $GLOBALS['TSFE']->tmpl->runThroughTemplates($rootLine, 0); } $GLOBALS['TSFE']->tmpl->generateConfig(); $GLOBALS['TSFE']->tmpl->loaded = 1; // builds a cObj $GLOBALS['TSFE']->newCObj(); // Add the FE user $GLOBALS['TSFE']->fe_user = EidUtility::initFeUser(); // $start = microtime(TRUE); $GLOBALS['TSFE']->determineId(); $GLOBALS['TSFE']->getConfigArray(); // echo 'Time: ' . (microtime(TRUE) - $start); } }
/** * Initialize frontend environment * * @return void */ public function __construct() { $this->bootstrap = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Core\\Bootstrap'); $feUserObj = EidUtility::initFeUser(); $pageId = GeneralUtility::_GET('id') ?: 1; $pageType = GeneralUtility::_GET('type') ?: 0; /** @var TypoScriptFrontendController $typoScriptFrontendController */ $this->typoScriptFrontendController = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], $pageId, $pageType, true); $GLOBALS['TSFE'] = $this->typoScriptFrontendController; $this->typoScriptFrontendController->connectToDB(); $this->typoScriptFrontendController->fe_user = $feUserObj; $this->typoScriptFrontendController->id = $pageId; $this->typoScriptFrontendController->determineId(); $this->typoScriptFrontendController->checkAlternativeIdMethods(); $this->typoScriptFrontendController->getCompressedTCarray(); $this->typoScriptFrontendController->initTemplate(); $this->typoScriptFrontendController->getConfigArray(); $this->typoScriptFrontendController->includeTCA(); $this->typoScriptFrontendController->settingLanguage(); $this->typoScriptFrontendController->settingLocale(); }
/** * */ protected function initializeUserAuthentication() { $this->feUserObj = EidUtility::initFeUser(); $this->feUserObj->fetchGroupData(); $this->databaseConnection = $GLOBALS['TYPO3_DB']; // This is obsolete since 6.1 but required for versions before. // It can be removed once support for TYPO3 below 6.1 is dropped. if (!$this->databaseConnection->isConnected()) { $this->databaseConnection->connectDB(); } }
/** * */ public function __construct() { \TYPO3\CMS\Frontend\Utility\EidUtility::initFeUser(); \TYPO3\CMS\Frontend\Utility\EidUtility::initLanguage(); \TYPO3\CMS\Frontend\Utility\EidUtility::initTCA(); }
* GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ /** * Stub for eID ajax calls. */ if (!defined('TYPO3_MODE')) { die('Access denied.'); } require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('pt_extbase') . 'Classes/Utility/AjaxDispatcher.php'; $TSFE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', $TYPO3_CONF_VARS, 0, 0); /* @var $TSFE \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController */ $TSFE->config['config'] = array(); $TSFE->renderCharset = 'utf-8'; $TSFE->fe_user = \TYPO3\CMS\Frontend\Utility\EidUtility::initFeUser(); $GLOBALS['TSFE'] = $TSFE; $typoscriptInclude = '<INCLUDE_TYPOSCRIPT:source="FILE:EXT:pt_extlist/Configuration/TypoScript/setup.txt">'; require_once PATH_t3lib . 'class.t3lib_tsparser.php'; $tsParser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser'); /* @var $tsParser \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser */ $externalTSFileContent = $tsParser->checkIncludeLines($typoscriptInclude); $tsParser->parse($externalTSFileContent); $GLOBALS['TSFE']->tmpl->setup = $tsParser->setup; $GLOBALS['TSFE']->sys_page = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository'); $dispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Tx_PtExtbase_Utility_AjaxDispatcher'); /* @var $dispatcher Tx_PtExtbase_Utility_AjaxDispatcher */ $dispatcher->setExtensionName('PtExtlist'); $dispatcher->setPluginName(''); $dispatcher->setControllerName(''); $dispatcher->setActionName(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('action'));
/** * @param array $TYPO3_CONF_VARS * * @return \Ecom\EcomToolbox\Utility\AjaxDispatcher */ public function init($TYPO3_CONF_VARS) { //define('TYPO3_MODE','FE'); $this->initCallArguments(); /** @var \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController $GLOBALS ['TSFE'] */ $GLOBALS['TSFE'] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class, $TYPO3_CONF_VARS, null, 0, true); $GLOBALS['TSFE']->fe_user = \TYPO3\CMS\Frontend\Utility\EidUtility::initFeUser(); \TYPO3\CMS\Frontend\Utility\EidUtility::initLanguage(); $GLOBALS['TSFE']->connectToDB(); $GLOBALS['TSFE']->initFEuser(); $GLOBALS['TSFE']->id = $this->pageUid; $GLOBALS['TSFE']->sys_language_content = $this->language; /** @var \TYPO3\CMS\Frontend\Page\PageRepository sys_page */ $GLOBALS['TSFE']->sys_page = CoreUtility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Page\PageRepository::class); $GLOBALS['TSFE']->sys_page->init($GLOBALS['TSFE']->showHiddenPage); ######################################################## $GLOBALS['TSFE']->checkAlternativeIdMethods(); $GLOBALS['TSFE']->clear_preview(); $GLOBALS['TSFE']->determineId(); $GLOBALS['TSFE']->initTemplate(); $GLOBALS['TSFE']->getConfigArray(); $GLOBALS['TSFE']->cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class); $GLOBALS['TSFE']->settingLanguage(); $GLOBALS['TSFE']->settingLocale(); return $this; }
<?php $folder = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('folder'); if (!empty($folder)) { $open = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('open') ? TRUE : FALSE; /** @var $leafStateService \BeechIt\FalSecuredownload\Service\LeafStateService */ $leafStateService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('BeechIt\\FalSecuredownload\\Service\\LeafStateService'); $leafStateService->saveLeafStateForUser(\TYPO3\CMS\Frontend\Utility\EidUtility::initFeUser(), $folder, $open); }
/** * Get the current frontend user object * * @access public * * @return \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication Instance of \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication or NULL on failure */ public static function getFeUser() { if (TYPO3_MODE === 'FE') { // Check if a user is currently logged in. if (!empty($GLOBALS['TSFE']->loginUser)) { return $GLOBALS['TSFE']->fe_user; } elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('eID') !== NULL) { return \TYPO3\CMS\Frontend\Utility\EidUtility::initFeUser(); } } else { if (TYPO3_DLOG) { \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getFeUser()] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); } } return; }
* For the full copyright and license information, please read the * LICENSE.txt file that was distributed with this source code. * * The TYPO3 extension Calendar Base (cal) project - inspiring people to share! */ // Exit, if script is called directly (must be included via eID in index_ts.php) use TYPO3\CMS\Core\Utility\GeneralUtility; if (!defined('PATH_typo3conf')) { die('Could not access this script directly!'); } if ($_COOKIE['fe_typo_user']) { session_id($_COOKIE['fe_typo_user']); session_start(); } // Initialize FE user object: $feUserObj = \TYPO3\CMS\Frontend\Utility\EidUtility::initFeUser(); // Connect to database: \TYPO3\CMS\Frontend\Utility\EidUtility::connectDB(); $controllerPiVarsGET = GeneralUtility::_GET('tx_cal_controller'); $controllerPiVarsPOST = GeneralUtility::_POST('tx_cal_controller'); $controllerPiVars = array(); if (is_array($controllerPiVarsPOST) && is_array($controllerPiVarsGET)) { $controllerPiVars = array_merge($controllerPiVarsPOST, $controllerPiVarsGET); } else { if (is_array($controllerPiVarsPOST)) { $controllerPiVars = $controllerPiVarsPOST; } else { if (is_array($controllerPiVarsGET)) { $controllerPiVars = $controllerPiVarsGET; } }