Altering UserPasswordForm redirect with a custom submit I want to alter the redirect of UserPasswordForm from Drupal’s core, I did this

function maubl_user_form_alter(&amp;$form, FormStateInterface $form_state, $form_id){
switch($form_id) {
case 'user_pass':
    $form['actions']['submit']['#submit'][] = 'maubl_user_submit_forgot_pass';
    break;
}
function maubl_user_submit_forgot_pass(&amp;$form, \Drupal\Core\Form\FormStateInterface $formState){

  $formState-&gt;setRedirect('&lt;front&gt;');

}


It does do the redirect correctly, but the submit  from UserPasswordForm doesnt excute anymore, so the mail doesnt get sent, does anyone know why and how I can fix that ?
By adding a submit handler to the submit element you override the main submit handler attached to the form. The use case for this option is if you want a submit element to have a completely different action.

Append your submit handler to the form and it should work as you have intended:

$form['#submit'][] = 'maubl_user_submit_forgot_pass';