Migrating a plugin from 2 to 4 - howto access the Site-User

So far I have been able to access the currently logged in user in Kirby 2:

$my_data[‘me_id’] = site()->user()->username() . “.json”;
$my_data[‘me_firsrname’] = site()->user()->firstname();

How does that work with Kirby 4?

It’s kirby()->user() now (or has been since Kirby 3)