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

Email confirmation with LDAP generating a 500 Internal server error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6.1
    • Component/s: Authentication
    • Labels:
    • Sprint:
      BACKEND Sprint 9

      Description

      Since upgrading to 2.6, when a new user clicks the registration confirmation link in the email, the confirm.php generates a 500 Internal server error and fails to activate the user.

      The Apache error log contains:
      PHP Fatal error: require_once(): Failed opening required '/user/lib.php' (include_path='/var/www/html/moodle-2.6/lib/zend:/var/www/html/moodle-2.6/lib/pear:.:/usr/share/pear:/usr/share/php') in /var/www/html/moodle-2.6/auth/ldap/auth.php on line 619

      Line 619 of auth/ldap/auth.php contains:
      require_once($CFG->dirroot.'/user/lib.php');

      It seems that $CFG is not accessible in the "user_confirm" function's context.

      Prior to 2.6, the user_confirm function didn't require any other librairies.

      My quick workaround for tomorrow morning:
      Hardcode the /usr/lib.php filesystem path at line 619, the confirmation process now works correctly.

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            jasminl Jasmin Levesque
            Peer reviewer:
            Mark Nelson
            Integrator:
            Damyon Wiese
            Tester:
            Jason Fowler
            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:
              Fix Release Date:
              13/Jan/14