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

Iffland, Sebastian Sebastian.Iffland at ecom-ex.com
Mon Feb 15 11:34:47 CET 2016


Hi Felipe,

Try statement if(isset($GLOBALS['BE_USER']) && (int)
$GLOBALS['BE_USER']->user['uid'] > 0)


Am 15/02/16 10:43 AM schrieb "typo3-dev-bounces at lists.typo3.org on behalf
of Felipe Rodriguez" unter <typo3-dev-bounces at lists.typo3.org on behalf of
felipe at netnnet.de>:

>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.
>

Mit freundlichen Grüßen
Kind regards

Sebastian Iffland
Senior Web Developer

Phone: +49 6294 4224 994  •  Fax: +49 6294 4224 100
E-Mail: mailto:Sebastian.Iffland at ecom-ex.comhttp://www.ecom-ex.com



THINK GREEN - KEEP IT ON THE SCREEN

_______________________________________________
>TYPO3-dev mailing list
>TYPO3-dev at lists.typo3.org
>http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev



ecom instruments GmbH
Industriestraße 2  •  97959 Assamstadt  •  Germany

Headquarters: Assamstadt  •  District Court Ulm: HRB 680352
Chief Executive Officer: Dipl. Ing. (FH) Rolf Nied  •  Customs Tax-No.: DE 146589088

_______________________________________________
>TYPO3-dev mailing list
>TYPO3-dev at lists.typo3.org
>http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev




More information about the TYPO3-dev mailing list