From b95b46a897f5c98dd31203221ed09c734b5460cc Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Wed, 14 Nov 2007 22:07:16 +0000 Subject: [PATCH] MDL-9399 auth/ldap: Manage 2 new config settings for NTLM SSO Changes in the forms and forms handling to set and edit NTLM SSO related config options. --- auth/ldap/auth.php | 6 ++++++ auth/ldap/config.html | 30 ++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index 384157d75c..8dde37fa4d 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -1803,6 +1803,10 @@ class auth_plugin_ldap extends auth_plugin_base { {$config->changepasswordurl = ''; } if (!isset($config->removeuser)) {$config->removeuser = 0; } + if (!isset($config->ntlmsso_enabled)) + {$config->ntlmsso_enabled = 0; } + if (!isset($config->ntlmsso_subnet)) + {$config->ntlmsso_subnet = ''; } // save settings set_config('host_url', $config->host_url, 'auth/ldap'); @@ -1833,6 +1837,8 @@ class auth_plugin_ldap extends auth_plugin_base { set_config('passtype', $config->passtype, 'auth/ldap'); set_config('changepasswordurl', $config->changepasswordurl, 'auth/ldap'); set_config('removeuser', $config->removeuser, 'auth/ldap'); + set_config('ntlmsso_enabled', (int)$config->ntlmsso_enabled, 'auth/ldap'); + set_config('ntlmsso_subnet', $config->ntlmsso_subnet, 'auth/ldap'); return true; } diff --git a/auth/ldap/config.html b/auth/ldap/config.html index 30036f8a62..55fe2debd0 100644 --- a/auth/ldap/config.html +++ b/auth/ldap/config.html @@ -55,6 +55,10 @@ {$config->changepasswordurl = ''; } if (!isset($config->removeuser)) {$config->removeuser = 0; } + if (!isset($config->ntlmsso_enabled)) + {$config->ntlmsso_enabled = 0; } + if (!isset($config->ntlmsso_subnet)) + {$config->ntlmsso_subnet = ''; } $yesno = array( get_string('no'), get_string('yes') ); @@ -439,6 +443,32 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? + + +

+ + + + + + + ntlmsso_enabled, '0'); + ?> + + + + + + + + + + + + +