kerli81/kirby-securedpages

Global access to $loginstatus

marcus-at-localhost opened this issue · 1 comments

It seems that with version 1.1.2 the new $loginstatus variable that contains the user and the logout url is not global.
While we can use $kirby->user()->username() to show the logged in status in any template/footer snippet etc, what would be the best way to have access on $loginstatus['logouturl'] ?

I suppose the best would be to extend the User object? But I haven't wrapped my head around all the kirby internals so it's hard to come up with something.

Any idea?

I guess the easiest is to use this directly in the template:
url('/no-permission', ['params' => ['action' => 'logout'], 'query' => ['prevloc' => Url::path()]])