You are here

function security_questions_user_pass_submit in Security Questions 6.2

Same name and namespace in other branches
  1. 7.2 security_questions.module \security_questions_user_pass_submit()

Submission handler for security_questions_form_user_pass_alter().

1 string reference to 'security_questions_user_pass_submit'
security_questions_form_user_pass_alter in ./security_questions.module
Implements hook_form_FORM_ID_alter().

File

./security_questions.module, line 539
Main module file for security_questions.

Code

function security_questions_user_pass_submit($form, &$form_state) {

  // If the user is allowed to bypass or has already answered the challenge,
  // hand off to the normal password reset submission handler.
  $account = $form_state['values']['account'];
  if (security_questions_bypass_challenge($account) || !empty($form_state['storage']['security_questions']['passed_challenge'])) {
    user_pass_submit($form, $form_state);
    unset($form_state['storage']['security_questions']);
  }
  else {
    $form_state['storage']['security_questions']['uid'] = $account->uid;
    $form_state['rebuild'] = TRUE;
  }
}