user.login:before /site/config/config.php return [ 'hooks' => [ 'user.login: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