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

reCAPTCHA setting hard-coded to auth/email

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.7
    • Fix Version/s: None
    • Component/s: Authentication
    • Labels:
    • Affected Branches:
      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');
      }

      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                poltawski Dan Poltawski
                Reporter:
                hrimhari Felipe Carasso
                Participants:
                Component watchers:
                Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: