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

IMS Enterprise enrolment module fails to set mnethostid for created users

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.8.3, 1.9
    • Component/s: Enrolments
    • Labels:
      None
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      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

            Assignee:
            nicolasconnault Nicolas Connault
            Reporter:
            acspike Aaron C Spike
            Tester:
            Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/Oct/07