Skip to content

Kirby 3.5.7.1

UserRules::changeLanguage()

Validates if the language can be changed

UserRules::changeLanguage(Kirby\Cms\User $user, string $language): bool

Parameters

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

Return type

bool

Exceptions

Type Description
Kirby\Exception\PermissionException If the user is not allowed to change the language

Parent class

Kirby\Cms\UserRules