Login and Logout

Login

site/snippets/account-login.php
<form action="<?= site()->url() ?>/klub/login" method="POST">
    <input type="hidden" name="token" value="<?= csrf() ?>">
    <input type="hidden" name="redirect" value="<?= site()->url() ?>">
    <input type="email" name="email" required
           placeholder="Email"
           value="<?= urldecode(get('email', '')) ?>">
    <input type="password" name="password" placeholder="Password" required>
    <button type="submit">Login</button>
</form>

Logout

site/snippets/account-logout.php
<form action="<?= site()->url() ?>/klub/logout" method="POST">
    <input type="hidden" name="token" value="<?= csrf() ?>">
    <input type="hidden" name="redirect" value="<?= site()->url() ?>">
    <button type="submit">Logout</button>
</form>
Kirby Klub is not affiliated with the developers of Kirby CMS. We are merely standing on the shoulder of giants.
© 2025 Bruno Meilick All rights reserved.