You are here

function _securesite_dialog_page in Secure Site 7.2

Same name and namespace in other branches
  1. 5 securesite.inc \_securesite_dialog_page()
  2. 6.2 securesite.inc \_securesite_dialog_page()
  3. 6 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.

6 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_denied in ./securesite.inc
Deny access to users who are not authorized to access secured pages.

... See full list

File

./securesite.inc, line 445
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,
  )))) {
    $user_login = drupal_get_form('securesite_user_login_form');
    $output = render($user_login);
    if (!empty($reset)) {
      $user_pass = drupal_get_form('securesite_user_pass');
      $output .= "<hr />\n" . render($user_pass);
    }
  }
  else {
    if (!empty($reset)) {
      $user_pass = drupal_get_form('securesite_user_pass');
      $output = render($user_pass);
    }
    else {
      $output = '<p>' . t('Reload the page to try logging in again.') . '</p>';
    }
  }
  return $output;
}