Attention
TYPO3 v12 has reached end-of-life as of April 30th 2026 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v12 here: TYPO3 ELTS.
Frontend user
The
frontend. frontend request attribute provides the
\TYPO3\ object.
The topic is described in depth in chapter Authentication.
Example:
EXT:my_extension/Classes/Service/MyService.php
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication;
public function doSomethingToFrontendUser(ServerRequestInterface $request): void
{
/** @var FrontendUserAuthentication $frontendUserAuthentification */
$frontendUserAuthentification = $request->getAttribute('frontend.user');
$frontendUserAuthentification->fetchGroupData($request);
// do something
}
Copied!
Tip
The frontend user id and groups are available from the User aspect.