Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.8.2
-
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.