Commit a9c1a187 authored by João Ventura's avatar João Ventura Committed by Joao Ventura
Browse files

Issue #3322478 by DamienMcKenna, jcnventura: $form['#submit'] doesn't always exist

parent 0c3afa1a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ function tfa_form_alter(&$form, &$form_state, $form_id) {
        // TFA form so the last handler in the order must be
        // tfa_login_form_redirect(). Other modules may alter the tfa_redirect
        // options element as needed to set the destination after TFA.
        $key = array_search('user_login_submit', $form['#submit']);
        $key = isset($form['#submit']) ? array_search('user_login_submit', $form['#submit']) : 0;
        $form['#submit'][$key] = 'tfa_login_submit';
        $form['#submit'][] = 'tfa_login_form_redirect';
      }