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 |