# Customers

Source: https://kart.bnomei.com/docs/content/customer-user-accounts
Updated: 2025-08-08T14:04:11+00:00
Summary: Kirby Kart auto-creates customer accounts on checkout, assigns roles, offers cart, orders & wishlist methods, soft deletes, and stores customer data in CMS.

## Automatic customer account creation

Unless you disable the `bnomei.kart.customers.enabled` configuration, the Kirby Kart plugin will automatically create a Kirby CMS user account with the role `customer` when completing an order and providing an email address. If a user with the same email address already exists, it will assign that user to the order instead.

Since the plugin checks for customers in a few places you can [add multiple valid roles](https://kart.bnomei.com/docs/guides/multiple-roles-for-customers) to `bnomei.kart.customers.roles` with the first one being the default to be assigned when creating customers.

It is totally up to you whether you provide your customers with a way to log in to that account. If you do not, the user accounts will only be used within the panel to link orders and users.

Add [sign-up and login forms](https://kart.bnomei.com/docs/forms/login-and-logout) (with or without [magic-link emails](https://kart.bnomei.com/docs/forms/magic-link-login)). Your customers can view their [previous orders](https://kart.bnomei.com/docs/content/orders), view a [Gravatar image](https://kart.bnomei.com/docs/guides/gravatar), or access additional services you might offer [only to registered customers](https://kart.bnomei.com/docs/guides/exclusive-content).

## Blueprint and Roles

The Kirby Kart plugin registers a single user blueprint/role named `customer`. This user has no access to the panel and has two hidden fields to store the cart and wishlist. You can check if a Kirby user object is accepted by the Kart plugin as a customer with `$user->isCustomer()`.

## Available User Methods

The plugin adds a few user methods to your setup. They are not limited to users with the `customer` role, but some might only yield useful results for those.

- `$user->cart()`
- `$user->completedOrders()`
- `$user->gravatar($sizeInPixel)`
- `$user->hasPurchased($product)`
- `$user->isCustomer()`
- `$user->kart()`
- `$user->orders()`
- `$user->sendMagicLink($success_url)`
- `$user->softDelete()`
- `$user->wishlist()`

## Soft deletes

Instead of completely deleting a user account, you can initially "soft" delete it to maintain relationships with orders. The Kirby Kart plugin will reset the password and change the role to `deleted,` thus locking the user out of the login and sign-up from Kart (since the new role is not in the `customer.roles` array from above). You can[ read more about soft deletes](https://kart.bnomei.com/docs/forms/delete-account) here.

## Data stored in the CMS

The Kirby Kart plugin saves the cart and wishlist to the user's content file and the provider's customer ID if known. Read more about [stored data](https://kart.bnomei.com/docs/data/data-stored-in-the-cms) here.