Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / auth / ldap / ntlmsso_attempt.php
blobc9fc4695e2bfa719e01443aa2d71dec3626a509e
1 <?php
3 require_once(dirname(dirname(dirname(__FILE__)))."/config.php");
5 //HTTPS is potentially required in this page
6 httpsrequired();
8 /// Define variables used in page
9 if (!$site = get_site()) {
10 error("No site found!");
13 $authsequence = get_enabled_auth_plugins(true); // auths, in sequence
14 if (!in_array('ldap',$authsequence,true)) {
15 print_error('ldap_isdisabled','auth');
18 $authplugin = get_auth_plugin('ldap');
19 if (empty($authplugin->config->ntlmsso_enabled)) {
20 print_error('ntlmsso_isdisabled','auth');
23 $sesskey = sesskey();
25 //print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, '', true);
26 $msg = '<p>'.get_string('ntlmsso_attempting','auth').'</p>'
27 . '<img width="1", height="1" '
28 . ' src="' . $CFG->wwwroot . '/auth/ldap/ntlmsso_magic.php?sesskey='
29 . $sesskey . '" />';
30 redirect($CFG->wwwroot . '/auth/ldap/ntlmsso_finish.php', $msg, 3);