user.logout:after $user, $session /site/config/config.php return [ 'hooks' => [ 'user.logout:after' => function ($user, $session) { // your code goes here } ] ]