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

Email confirmation with LDAP generating a 500 Internal server error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 2.6.1
    • 2.6
    • Authentication
    • BACKEND Sprint 9

      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.

            skodak Petr Skoda
            jasminl Jasmin Levesque
            Mark Nelson Mark Nelson
            Damyon Wiese Damyon Wiese
            Jason Fowler Jason Fowler
            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.