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