MDL-36987 auth_manual: fix config for field locking

Thanks to Sergey for the patch
This commit is contained in:
Marina Glancy 2014-10-16 17:57:09 +08:00
parent 050b930fa7
commit c74ec3e619

View File

@ -41,13 +41,16 @@ class auth_plugin_manual extends auth_plugin_base {
* The name of the component. Used by the configuration.
*/
const COMPONENT_NAME = 'auth_manual';
const LEGACY_COMPONENT_NAME = 'auth/manual';
/**
* Constructor.
*/
function auth_plugin_manual() {
$this->authtype = 'manual';
$this->config = get_config(self::COMPONENT_NAME);
$config = get_config(self::COMPONENT_NAME);
$legacyconfig = get_config(self::LEGACY_COMPONENT_NAME);
$this->config = (object)array_merge((array)$legacyconfig, (array)$config);
}
/**