Merge branch 'wip_mdl-31540-master' of https://github.com/iarenaza/moodle
Conflicts: auth/ldap/auth.php
This commit is contained in:
+7
-1
@@ -1778,10 +1778,16 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
$config->ntlmsso_type = 'ntlm';
|
||||
}
|
||||
|
||||
// Try to remove duplicates before storing the contexts (to avoid problems in sync_users()).
|
||||
$config->contexts = explode(';', $config->contexts);
|
||||
$config->contexts = array_map(create_function('$x', 'return textlib::strtolower(trim($x));'),
|
||||
$config->contexts);
|
||||
$config->contexts = implode(';', array_unique($config->contexts));
|
||||
|
||||
// Save settings
|
||||
set_config('host_url', trim($config->host_url), $this->pluginconfig);
|
||||
set_config('ldapencoding', trim($config->ldapencoding), $this->pluginconfig);
|
||||
set_config('contexts', trim($config->contexts), $this->pluginconfig);
|
||||
set_config('contexts', $config->contexts, $this->pluginconfig);
|
||||
set_config('user_type', textlib::strtolower(trim($config->user_type)), $this->pluginconfig);
|
||||
set_config('user_attribute', textlib::strtolower(trim($config->user_attribute)), $this->pluginconfig);
|
||||
set_config('search_sub', $config->search_sub, $this->pluginconfig);
|
||||
|
||||
Reference in New Issue
Block a user