You are here

function _securesite_dialog_page in Secure Site 6.2

Same name and namespace in other branches
  1. 5 securesite.inc \_securesite_dialog_page()
  2. 6 securesite.inc \_securesite_dialog_page()
  3. 7.2 securesite.inc \_securesite_dialog_page()

Display fall-back HTML for HTTP authentication dialogs. Safari will not load this. Opera will not load this after log-out unless the page has been reloaded and the authentication dialog has been displayed twice.

5 calls to _securesite_dialog_page()
SecureSiteFunctionDialogPageUnitTest::testSecureSiteDialogPageBoth in ./securesite.test
Check output with both log-in and password reset enabled.
SecureSiteFunctionDialogPageUnitTest::testSecureSiteDialogPageLogin in ./securesite.test
Check output with log-in enabled and password reset disabled.
SecureSiteFunctionDialogPageUnitTest::testSecureSiteDialogPageNeither in ./securesite.test
Check output with both log-in and password reset disabled.
SecureSiteFunctionDialogPageUnitTest::testSecureSiteDialogPageReset in ./securesite.test
Check output with log-in disabled and password reset enabled.
_securesite_dialog in ./securesite.inc
Display authentication dialog and send password reset mails.

File

./securesite.inc, line 393
Secure Site log-in functions.

Code

function _securesite_dialog_page() {
  $reset = variable_get('securesite_reset_form', t('Enter your user name or e-mail address.'));
  if (in_array(SECURESITE_FORM, variable_get('securesite_type', array(
    SECURESITE_BASIC,
  )))) {
    $output = drupal_get_form('securesite_user_login');
    $output .= empty($reset) ? '' : "<hr />\n" . drupal_get_form('securesite_user_pass');
  }
  else {
    if (!empty($reset)) {
      $output = drupal_get_form('securesite_user_pass');
    }
    else {
      $output = '<p>' . t('Reload the page to try logging in again.') . '</p>';
    }
  }
  return $output;
}