$user->delete()
Deletes the user
$user->delete(): boolReturn type
bool
This method modifies the existing $user object it is applied to and returns it again.
Exceptions
| Type | Description | 
|---|---|
| Kirby\Exception\LogicException | 
Parent class
Examples
try {
  $kirby->user('bastian@example.com')->delete();
  echo 'The user has been deleted';
} catch(Exception $e) {
  echo 'The user could not be deleted';
  // optional reason: echo $e->getMessage();
}