[TYPO3-english] $GLOBALS['BE_USER'] is empty if be us er is logged in
Patrick Rodacker
patrick.rodacker at the-reflection.de
Wed Dec 3 22:09:55 CET 2008
Hi Goran,
Goran Liczic wrote on 03.12.2008 21:46:
> I have a typo 3 extension written.
> Here I want to ask the script if a certain BE user (non Admin) has a backend session, means, if he is logged in in BE.
> If he is logged in, I want to execute a function.
>
> My problem is the following:
> With
> $GLOBALS['TSFE']->be_user result is debug, also with
> $GLOBALS['BE_USER'] result is also debug.
>
> Both objects are always empty if loggined in in BE or not.
>
> So what ca I do to check in php code, if a certain user (e.g. with id 2) is logged in?
>
> I don't know what to do else - nothing works for me...
>
> Any help highly appreciated!
have you tried t3lib_div::debug($GLOBALS['BE_USER']); to debug the
object in your module. There you could see, that you could check for a
certain uid against $GLOBALS['BE_USER']->user['uid'] .
HTH
Patrick
More information about the TYPO3-english
mailing list