mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
Merge branch 'MDL-51217-master' of git://github.com/lucisgit/moodle
This commit is contained in:
commit
7426ea3dac
@ -240,7 +240,7 @@ class auth_plugin_email extends auth_plugin_base {
|
||||
*/
|
||||
function is_captcha_enabled() {
|
||||
global $CFG;
|
||||
return isset($CFG->recaptchapublickey) && isset($CFG->recaptchaprivatekey) && get_config("auth/{$this->authtype}", 'recaptcha');
|
||||
return $this->config->recaptcha;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -192,7 +192,8 @@ class login_signup_form extends moodleform {
|
||||
*/
|
||||
function signup_captcha_enabled() {
|
||||
global $CFG;
|
||||
return !empty($CFG->recaptchapublickey) && !empty($CFG->recaptchaprivatekey) && get_config('auth/email', 'recaptcha');
|
||||
$authplugin = get_auth_plugin($CFG->registerauth);
|
||||
return !empty($CFG->recaptchapublickey) && !empty($CFG->recaptchaprivatekey) && $authplugin->is_captcha_enabled();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user