donators

n@work Internet Informationssysteme GmbHYour ad here

sponsors

Advertising

Getting Frontend User data

By: Thomas

02.01.06 15:24 Age: 5 yrs

I want to work with the userdata of the currently logged in frontend user. How can I get them?

TYPO3 stores the data of the frontend user in a special object inside the TSFE. The user object can be reached with:

  1.  
  2. $GLOBALS['TSFE']->fe_user;
  3.  

To get a special value of the user like UID or EMAIL you can reach them like this:

  1.  
  2. // the UID of the user
  3. $GLOBALS['TSFE']->fe_user->user['uid'];
  4.  
  5. // the email address of the user
  6. $GLOBALS['TSFE']->fe_user->user['email'];
  7.  

Found a mistake?

If you found a mistake or if you have a good tip or suggestion, please contact me at thomas(at)typo3-unleashed.net. I will check it and correct the entry or insert the new one.

Thanks in advance for your help.