[Typo3] Frontend UserID & Hidden Page

Kraft Bernhard kraftb at gmx.net
Tue Mar 1 10:01:26 CET 2005

Friedrich Schick wrote:
> 1. How do i get the Id of a frontend user or if the user has not logged in

$GLOBALS['TSFE']->fe_user->user contains the database row of the logged in
user (if logged in). If not logged in it simply contains nothing.

So you can check
if ($user_uid = intval($GLOBALS['TSFE']->fe_user->user['uid']) {
	$content .= 'Your are UID '.$user_uid.' and you are logged in !';

> 2. How can i check if the frontend user is on a hidden page (well, the 
> vistor, not logged in will see a clear page)

It will contain -1 For "hide at login"
-2 for "Show at any login"
or the respective usergroup ...

Kraft Bernhard
MOKKA Medienagentur <http://www.mokka.at>
T: +43 - 1 - 895 33 33 - 50

More information about the TYPO3-english mailing list