$site->user() doesn´t work any more?

I have a page, which should be shown only if a user has the admin role. I used the code from the example:

if(!$site->user() || !$site->user()->hasRole('admin') ) :
  go('/');
else :
  // display content

This worked fine, until I switched to the delevop branch of the panel. And to use this, I also changed to the lastest commit of the develop branches in kirby and toolkit.

Am I doing something wrong, or is this a bug?

Having the same problems.

Yeah, same here …
(and some more characters)

I have a new more secure session handler since the new version, which broke the frontend/backend authentication. It’s now fixed.

1 Like

Thanks for the quick fix.