Details
-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.7
-
MOODLE_27_STABLE
Description
In login/signup_form.php, there's a function to check for reCAPTCHA being enabled or not. This function looks for a configuration linked to the auth/email plugin.
But if a different auth plugin wants to reuse all that and keep its own reCAPTCHA setting, it's at a loss.
I created a patch, but it feels like overkill to publish an entire branch of Moodle just for this simple change. Here it is then:
diff --git a/login/signup_form.php b/login/signup_form.php
index 71ad670..c816e51 100644
— a/login/signup_form.php
+++ b/login/signup_form.php
@@ -191,7 +191,7 @@ class login_signup_form extends moodleform {
*/
function signup_captcha_enabled() {
global $CFG;
- return !empty($CFG->recaptchapublickey) && !empty($CFG->recaptchaprivatekey) && get_config('auth/email', 'recaptcha');
+ return !empty($CFG->recaptchapublickey) && !empty($CFG->recaptchaprivatekey) && get_config("auth/{$CFG->registerauth}", 'recaptcha');
}
}