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

IMS Enterprise enrolment module fails to set mnethostid for created users

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.2
    • 1.8.3, 1.9
    • Enrolments
    • None
    • MySQL
    • MOODLE_18_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

    Description

      The default value of 0 is then assigned to these new users and a duplicate account (without the proper enrolment) is created for them the first time the attempt to authenticate (using ldap for authentication). I think this issue could perhaps be solved with a patch like the following.

      diff --git a/enrol/imsenterprise/enrol.php b/enrol/imsenterprise/enrol.php
      index 5dce80d..f624785 100644
      — a/enrol/imsenterprise/enrol.php
      +++ b/enrol/imsenterprise/enrol.php
      @@ -664,6 +664,7 @@ function process_person_tag($tagcontents){
      $person->auth = $CFG->auth;
      $person->confirmed = 1;
      $person->timemodified = time();
      + $person->mnethostid = $CFG->mnet_localhost_id;
      if($id = insert_record('user', addslashes_object($person))){
      /*
      Photo processing is deactivated until we hear from Moodle dev forum about modification to gdlib.

      Attachments

        Activity

          People

            nicolasconnault Nicolas Connault
            acspike Aaron C Spike
            Nobody Nobody
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Oct/07