# Delete Account Source: https://kart.bnomei.com/docs/forms/delete-account Updated: 2025-08-08T14:06:23+00:00 Summary: Soft-delete user accounts in Kirby Kart: change role to “deleted”, reset passwords, add a deletion form snippet, and hook “kart.user.softDeleted” for actions. ## Delete Account The Kirby Kart plugin can perform a "soft" delete on a user account. It does not remove the Kirby user account but changes the role from `customer` to `deleted` to retain relations to orders. It will reset the password and since the role changed the user will not be able to login or register anew with magic links. Soft deleted accounts are not considered "customers" by the Kirby Kart plugin. You can use the following code to create a form for account deletion. Path: site/snippets/kart/account-delete.php Code (php): ```
``` If you need to perform additional tasks when the user deletes their account consider registering the the `kart.user.softDeleted`-hook. Path: site/config/config.php Code (php): ``` [ 'kart.user.softDeleted' => function (?User $user = null): void { // TIP: a discord notification to yourself // or delete the account for real with $user->delete(); }, ], // other options ]; ```