Skip to content

Kirby 3.9.8

UserRules::validRole()

Validates a user role

UserRules::validRole(Kirby\Cms\User $user, string $role): bool

Parameters

Name Type Default
$user * Kirby\Cms\User
$role * string

Return type

bool

Exceptions

Type Description
Kirby\Exception\InvalidArgumentException If the user role does not exist

Parent class

Kirby\Cms\UserRules