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