UserRules::delete()
Validates if the user can be deleted
UserRules::delete(Kirby\Cms\User $user): void
Parameters
| Name | Type | Default |
|---|---|---|
| $userrequired | Kirby\Cms\User |
no default value |
Exceptions
| Type | Description |
|---|---|
Kirby\Exception\LogicException |
If this is the last user or last admin, which cannot be deleted |
Kirby\Exception\PermissionException |
If the user is not allowed to delete this user |