user.changeRole:before /site/config/config.php return [ 'hooks' => [ 'user.changeRole:before' => function (Kirby\Cms\User $user, string $role) { // your code goes here } ] ] Parameters Parameter Type $user Kirby\Cms\User $role string