[Typo3] Frontend UserID & Hidden Page

Friedrich Schick Friedrich.Schick at web.de
Tue Mar 1 10:04:34 CET 2005


Kraft Bernhard schrieb:

> 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)
>
>
> Check
> $GLOBALS['TSFE']->page['fe_group']
> It will contain -1 For "hide at login"
> -2 for "Show at any login"
> or the respective usergroup ...
>
>
> greets,
> Bernhard

Thank you, that is exactly what i need.

Cheers,

Schick



More information about the TYPO3-english mailing list