From c0c7a0d2d49cb815b37d6b07555a7916aacfe1b6 Mon Sep 17 00:00:00 2001 From: klsoft-web Date: Wed, 28 Jan 2026 10:43:03 +0300 Subject: [PATCH] The 'Using Yiisoft\User\CurrentUser' section has been refactored --- src/guide/security/authentication.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/guide/security/authentication.md b/src/guide/security/authentication.md index dc077fbb..54dca22b 100644 --- a/src/guide/security/authentication.md +++ b/src/guide/security/authentication.md @@ -143,12 +143,9 @@ use Yiisoft\User\CurrentUser; final readonly class SiteController { - public function __construct( - private ServerRequestInterface $request, - private CurrentUser $user, - ) {} + public function __construct(private CurrentUser $user) {} - public function index(): ResponseInterface + public function index(ServerRequestInterface $request): ResponseInterface { if ($this->user->isGuest()) { // user is guest