MDL-51217 auth: check if recaptcha enabled for current plugin

This commit is contained in:
Marina Glancy 2015-09-16 15:30:04 +08:00
parent a853f15fc3
commit 0f7f30021a
3 changed files with 7 additions and 4 deletions

View File

@ -235,12 +235,11 @@ class auth_plugin_email extends auth_plugin_base {
}
/**
* Returns whether or not the captcha element is enabled, and the admin settings fulfil its requirements.
* Returns whether or not the captcha element is enabled.
* @return bool
*/
function is_captcha_enabled() {
global $CFG;
return $this->config->recaptcha;
return get_config("auth/{$this->authtype}", 'recaptcha');
}
}

View File

@ -1,6 +1,10 @@
This files describes API changes in /auth/* - plugins,
information provided here is intended especially for developers.
=== 3.0 ===
* login_signup_form::signup_captcha_enabled() now calls is_captcha_enabled() from the current auth plugin instead of from auth_email
=== 2.9 ===
* Do not update user->firstaccess from any auth plugin, the complete_user_login() does it automatically.

View File

@ -536,7 +536,7 @@ class auth_plugin_base {
}
/**
* Returns whether or not the captcha element is enabled, and the admin settings fulfil its requirements.
* Returns whether or not the captcha element is enabled.
*
* @abstract Implement in child classes
* @return bool