Skip to content

Kirby 3.5.7.1

$user->delete()

Deletes the user

$user->delete(): bool

Return type

bool

Exceptions

Parent class

Kirby\Cms\User

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();

}