Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-47462

reCAPTCHA setting hard-coded to auth/email

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.7
    • Authentication
    • MOODLE_27_STABLE

      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');
      }

      }

            poltawski Dan Poltawski
            hrimhari Felipe Carasso
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.