I have built a site with user authentication, following this tutorial from the cookbook
https://getkirby.com/docs/cookbook/authentication
Login of registered users works.
Now, I want to show the username of the logged in user in the menu bar, using code like this in my templates:
<?php echo ($user->username()) ?>
Always get an error: Undefined variable: User
Kind of perplexed, should definitely work.
Any hint?