[TYPO3-english] Is using global $BE_USER incorrect?

Nicolas Kuttler typo3-english at nicolaskuttler.de
Mon Sep 27 19:51:17 CEST 2010


On Mon, Sep 27, 2010 at 05:50:13PM +0200, Bjoern Pedersen wrote:
> Am 27.09.2010 17:41, schrieb Nicolas Kuttler:
> > Why is global $BE_USER only defined for backend admin users? The
> > documentation seems to say it should be defined for all BE users.
> > 
> > http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.3.0/view/3/6/
> > 
> > I have inspected it from a userfunct and from an extension, it's defined
> > for BE admin users only (tested in 4.2 and 4.4.).
> > 
> > Nicolas 
> 
> $BE_USER is only defined in a BE context (so e.g. BE modules). Your
> description is a bit unclear, userfunctions and  extensions are normally
> uses in a FE context.
> 
> So, what do you want to achieve and how did you try it? Post some code,
> please.

I want to run some code when visiting a FE page and any BE user is
logged in. All examples I found look like:

typoscript:
[globalVar = TSFE:beUserLogin>0]
# do something
[global]

This condition is only true for BE admin users, which is rather useless
in my case.



More information about the TYPO3-english mailing list