[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/auth/ldap/ -> ntlmsso_attempt.php (source)

   1  <?php
   2  
   3  require(__DIR__.'/../../config.php');
   4  
   5  //HTTPS is required in this page when $CFG->loginhttps enabled
   6  $PAGE->https_required();
   7  
   8  $PAGE->set_url('/auth/ldap/ntlmsso_attempt.php');
   9  $PAGE->set_context(context_system::instance());
  10  
  11  // Define variables used in page
  12  $site = get_site();
  13  
  14  $authsequence = get_enabled_auth_plugins(true); // auths, in sequence
  15  if (!in_array('ldap', $authsequence, true)) {
  16      print_error('ldap_isdisabled', 'auth');
  17  }
  18  
  19  $authplugin = get_auth_plugin('ldap');
  20  if (empty($authplugin->config->ntlmsso_enabled)) {
  21      print_error('ntlmsso_isdisabled', 'auth_ldap');
  22  }
  23  
  24  $sesskey = sesskey();
  25  
  26  // Display the page header. This makes redirect respect the timeout we specify
  27  // here (and not add 3 more secs) which in turn prevents a bug in both IE 6.x
  28  // and FF 3.x (Windows version at least) where javascript timers fire up even
  29  // when we've already left the page that set the timer.
  30  $loginsite = get_string("loginsite");
  31  $PAGE->navbar->add($loginsite);
  32  $PAGE->set_title("$site->fullname: $loginsite");
  33  $PAGE->set_heading($site->fullname);
  34  echo $OUTPUT->header();
  35  
  36  // $PAGE->https_required() up above takes care of what $CFG->httpswwwroot should be.
  37  $msg = '<p>'.get_string('ntlmsso_attempting', 'auth_ldap').'</p>'
  38      . '<img width="1", height="1" '
  39      . ' src="' . $CFG->httpswwwroot . '/auth/ldap/ntlmsso_magic.php?sesskey='
  40      . $sesskey . '" />';
  41  redirect($CFG->httpswwwroot . '/auth/ldap/ntlmsso_finish.php', $msg, 3);


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1