---
title: "Frontend user"
manual: "TYPO3 Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3coreapi:typo3-request-attribute-frontend-user@main"
source: "ApiOverview/RequestLifeCycle/RequestAttributes/FrontendUser.rst"
rendered: "2026-09-19T06:56:03+00:00"
---

# Frontend user {#typo3-request-attribute-frontend-user}

The `frontend.user` frontend request attribute provides the
`\TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication` object.

The topic is described in depth in chapter
[Authentication](https://docs.typo3.org/permalink/t3coreapi:authentication).

Example:

**EXT:my_extension/Classes/Service/MyService.php**

```php
<?php

declare(strict_types=1);

namespace MyVendor\MyExtension\Service;

use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication;

final class MyService
{
  public function doSomethingToFrontendUser(
    ServerRequestInterface $request,
  ): void {
    /** @var FrontendUserAuthentication $frontendUserAuthentification */
    $frontendUserAuthentification = $request->getAttribute('frontend.user');
    $frontendUserAuthentification->fetchGroupData($request);
    // do something
  }
}

```

> [!TIP]
> The frontend user id and groups are available from the
> [User aspect](https://docs.typo3.org/permalink/t3coreapi:context-api-aspects-user@main).
