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