Hi I am still working on the migration of a Kirby plugin from version 2 to 4.
I have an admin Kirby-User, and am logged in with it. I am trying to check in my controller whether the logged-in user is an admin or not. However, this does not work because the user in the Kirby object is null (see Screenshot). What is going wrong?
My Controller:
return function ($site, $page, $kirby) {
if ($kirby->user()->isAdmin()) {
}
return [
'data' => $data,
];
}