$user->delete()
Deletes the user
$user->delete(): bool
Return type
bool
Exceptions
Type | Description |
---|---|
Kirby\Exception\LogicException |
Parent class
Example
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();
}