[TYPO3-english] $GLOBALS["TSFE"]->feuser

alex widschwendter a.widschwendter at mediares.at
Fri Jun 19 15:18:34 CEST 2009


hi,

> In a rightclickmenu I need to get user information, but the values in 
> $GLOBALS["TSFE"]->feuser are empty, and therefor not init. The menu is a 
> ajax menu, and so the php page who generate the men is a "stand alone" file. 
> With a init.php (stole and rewrited "/typo3/init.php") I have set up the 
> difference variables, but not the $GLOBALS["TSFE"]->feuser.
> 
> Does anyone know where in the core $GLOBALS["TSFE"]->feuser is set, or 
> better which T3 class do I have to include on me standalone page???

afaik you could use an eid script for that.

a template for you script:

<?php
require_once(PATH_tslib.'class.tslib_pibase.php');
//require_once(PATH_tslib.'class.tslib_fe.php');
// Exit, if script is called directly (must be included via eID in 
index_ts.php)
//if (!defined ('PATH_typo3conf')) die ('Could not access this script 
directly!');

// Initialize FE user object:
$feUserObj = tslib_eidtools::initFeUser();

// Connect to database:
tslib_eidtools::connectDB();

you have to enable the eid script in the ext_localconf.php of your 
extension:

$TYPO3_CONF_VARS['FE']['eID_include']['addToBasket'] = 
'EXT:mdrs_24safe_shop/addToBasket.php';

hth alex


More information about the TYPO3-english mailing list