[TYPO3-dev] Check if BE user is logged in

Felipe Rodriguez felipe at netnnet.de
Mon Feb 15 10:43:39 CET 2016


This might be a silly question but cannot find a solution. I want to check if a BE user is logged in during a query in a repository. The idea is to check if a be user is logged in and in that case return also the hidden records using $query->getQuerySettings()->setIgnoreEnableFields(true).

As far as I've read this is done using $GLOBALS['TSFE']->isBackendUserLoggedIn() but this is giving me a false value. I'm logged in as a be user (same browser, same window, different tab) but it still gives me a false value. When I try to print_r the $GLOBALS['BE_USER'] it gives me NULL.

Help would be very appreciated. Thanks.



More information about the TYPO3-dev mailing list