mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-25 21:55:54 +00:00
23 lines
449 B
PHP
23 lines
449 B
PHP
<?php
|
|
|
|
namespace App\Controller;
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
use Symfony\Bundle\SecurityBundle\Security;
|
|
use Symfony\Component\Security\Core\User\UserInterface;
|
|
|
|
class MeController extends AbstractController
|
|
{
|
|
public function __construct(
|
|
private readonly Security $security
|
|
)
|
|
{
|
|
|
|
}
|
|
|
|
public function __invoke(): UserInterface
|
|
{
|
|
return $this->security->getUser();
|
|
}
|
|
|
|
} |