function miniorange_2fa_inline_registration::handle_page_three_submit in Google Authenticator / 2 Factor Authentication - 2FA 8
Same name and namespace in other branches
- 8.2 src/Form/miniorange_2fa_inline_registration.php \Drupal\miniorange_2fa\form\miniorange_2fa_inline_registration::handle_page_three_submit()
File
- src/
Form/ miniorange_2fa_inline_registration.php, line 365
Class
Namespace
Drupal\miniorange_2fa\formCode
function handle_page_three_submit(array $form, \Drupal\Core\Form\FormStateInterface &$form_state) {
$storage = $form_state
->getStorage();
$form_state
->setRebuild();
$method = $form['mo_auth_method']['#value'];
if ($method == AuthenticationType::$EMAIL_VERIFICATION['code']) {
// Go to Step 5 directly
$page = [
'page_five' => TRUE,
'page_three_values' => $form_state
->getValues(),
'page_two_values' => $storage['page_two_values'],
'page_one_values' => $storage['page_one_values'],
];
$form_state
->setStorage($page);
}
else {
$page = [
'page_four' => TRUE,
'page_three_values' => $form_state
->getValues(),
'page_two_values' => $storage['page_two_values'],
'page_one_values' => $storage['page_one_values'],
];
$_SESSION['message'] = '';
$_SESSION['success_status'] = TRUE;
$form_state
->setStorage($page);
}
}