[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
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_finish.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 // If ntlmsso_finish() succeeds, then the code never returns, 25 // so we only worry about failure. 26 if (!$authplugin->ntlmsso_finish()) { 27 // Redirect to login, saying "don't try again!" 28 // Display the page header. This makes redirect respect the timeout we specify 29 // here (and not add 3 more secs). 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 redirect($CFG->httpswwwroot . '/login/index.php?authldap_skipntlmsso=1', 36 get_string('ntlmsso_failed','auth_ldap'), 3); 37 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |