You are here

function getStepNumber in Google Authenticator / 2 Factor Authentication - 2FA 7

9 calls to getStepNumber()
mo_auth_get_google_authentication_form in ./mo_auth_inline_registration.inc
mo_auth_get_kba_authentication_form in ./mo_auth_inline_registration.inc
mo_auth_get_otp_over_sms_authentication_form in ./mo_auth_inline_registration.inc
mo_auth_get_otp_over_sms_validate_form in ./mo_auth_inline_registration.inc
mo_auth_get_qrcode_authentication_form in ./mo_auth_inline_registration.inc

... See full list

File

./mo_auth_inline_registration.inc, line 1405

Code

function getStepNumber($defaultStepNumber, $defaultMaxSteps) {
  if (backupIsDisabled()) {
    $defaultMaxSteps--;
  }

  // user is logged in means he is reconfiguring his 2FA method
  if (user_is_logged_in()) {
    $defaultMaxSteps = 2;
    $defaultStepNumber -= 2;
  }
  return strval($defaultStepNumber) . '/' . strval($defaultMaxSteps);
}