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

Email confirmation with LDAP generating a 500 Internal server error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.6
    • 2.6.1
    • Authentication
    • 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

            skodak Petr Skoda
            jasminl Jasmin Levesque
            Mark Nelson Mark Nelson
            Damyon Wiese Damyon Wiese
            Jason Fowler Jason Fowler
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              13/Jan/14