function system_mfa_login_form
Search API
7.x system.module | system_mfa_login_form() |
6.x system.module | system_mfa_login_form() |
File
- modules/
system/ system.module, line 3218
Code
function system_mfa_login_form() {
$form = array();
$db_row = $_SESSION ['mfa__form_state_db_row'];
$email = $db_row ['email'];
$obf_email = substr($email, 0, 5) . str_repeat("*", strlen($email) - 5);
$form ['mark_top_msg'] = array(
'value' => "<strong>" . t("A message has been sent to your email address (%obfemail) with a code to continue. Please enter the code below.", array("%obfemail" => $obf_email)) . "</strong>
<p>" . t("Check your Spam or Bulk Mail folder if you do not receive the email within 5 minutes.") . "</p>
<p>" . t("To recreate and resend the validation code, simply return to the login page and try again.") . "</p>
<hr>",
'weight' => 10,
);
$form ['mfa_code'] = array(
'type' => 'textfield',
'label' => t("Code:"),
'weight' => 20,
'required' => TRUE,
);
$form ['mfa_remember'] = array(
'type' => 'checkbox',
'label' => t("Do not ask again for this browser/device for 30 days?"),
'weight' => 30,
);
$form ['submit_btn'] = array(
'type' => 'submit',
'value' => t("Submit"),
'spinner' => TRUE,
'weight' => 200,
);
return $form;
}