Skip to content

Kirby 3.5.7.1

UserRules::delete()

Validates if the user can be deleted

UserRules::delete(Kirby\Cms\User $user): bool

Parameters

Name Type Default
$user * Kirby\Cms\User

Return type

bool

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

Parent class

Kirby\Cms\UserRules