Skip to content

Commit c460346

Browse files
authored
Update security.rst
1 parent 8a2bbe7 commit c460346

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

security.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2106,6 +2106,11 @@ accessed via the ``getUser()`` shortcut in the
21062106
{
21072107
// $user is an instance of \App\Entity\User
21082108
}
2109+
2110+
public function profile(#[CurrentUser] ?User $user): Response
2111+
{
2112+
// $user is an instance of \App\Entity\User or null as unauthenticated
2113+
}
21092114
}
21102115

21112116
Fetching the User from a Service

0 commit comments

Comments
 (0)