New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to logout via link #15
Comments
Hello there! kirby-locked-pages/LockedPages.php Line 27 in 6bcacb2
|
This was quick. Thank you. |
Feel free to post the answer here once you find it. 🙂 |
@tinogithub I was also looking for a practical example. It's a pity that it's missing from the documentation here.
Unfortunately, I was unable to redirect to the original login page. Instead, however, a corresponding page can be created that confirms the logout. And this is the code for the logout button. It is only displayed in the navigation if a visitor is logged in. If a user is logged into the panel, these sessions are not terminated.
I am happy to receive suggestions for optimization from expert programmers ;-) |
Hello,
thank you for your plugin. I am trying to implement a logout-Link in my navigation-bar but I come around to questions:
I assumed to do something like this but I get an error "Call to undefined function isLocked()"
<?php if($page.isLocked()):?><a href="<?= kirby()->trigger('locked-pages.logout') ?>">Logout</a><?php endif?>
Do I have to register locked-pages somewhere in my templates first?
I am still new to kirby-plugins and I couldn't find an answer in the forum or kirby help pages.
Thank you for help.
The text was updated successfully, but these errors were encountered: