Automatic Member Creation
Klub can create a new Kirby user after a successful checkout. Use this when you want a purchase to automatically become a member account. This applies to both one-time payments and subscriptions.
Configuration
bnomei.klub.members.create(defaulttrue) enables auto-creation.bnomei.klub.members.rolesdefines allowed roles; the first role is assigned to new members.
New members
When a checkout succeeds and no user exists for the provider customer data or email, Klub creates a new user, stores provider data, and logs the user in.
Existing members
If the user already exists, Klub attaches the provider data and updates gates/payments. It does not log the user in automatically to avoid account takeover scenarios.
Notes
- When
members.createisfalse, a logged-in user is required before checkout. - Provider customer IDs are stored on the user to keep subsequent purchases consistent.