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

IMS Enterprise enrolment module fails to set mnethostid for created users

    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.

        Gliffy Diagrams

          Activity

          Hide
          dougiamas Martin Dougiamas added a comment -

          I think this looks right, can you check it in Nicolas? Thanks, Aaron.

          Show
          dougiamas Martin Dougiamas added a comment - I think this looks right, can you check it in Nicolas? Thanks, Aaron.
          Hide
          nicolasconnault Nicolas Connault added a comment -

          Patch applied to 1.8 and 1.9

          Show
          nicolasconnault Nicolas Connault added a comment - Patch applied to 1.8 and 1.9

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

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