]> git.mjollnir.org Git - moodle.git/commitdiff
Changed the flag to be on a given user basis (just in case it gets called
authormoodler <moodler>
Mon, 25 Sep 2006 01:42:41 +0000 (01:42 +0000)
committermoodler <moodler>
Mon, 25 Sep 2006 01:42:41 +0000 (01:42 +0000)
for a lot of users)

lib/accesslib.php

index 74866291e00b23c11ca085780c314bf13626be18..36b3d7cdf6334e74bb83a45ccb465784856e9ef4 100755 (executable)
@@ -744,11 +744,11 @@ function check_enrolment_plugins(&$user) {
 
     static $inprogress;  // To prevent this function being called more than once in an invocation
 
-    if (!empty($inprogress)) {
+    if (!empty($inprogress[$user->id])) {
         return;
     }
 
-    $inprogress = true;  // Set the flag
+    $inprogress[$user->id] = true;  // Set the flag
 
     require_once($CFG->dirroot .'/enrol/enrol.class.php');
 
@@ -775,7 +775,7 @@ function check_enrolment_plugins(&$user) {
         unset($enrol);
     }
 
-    $inprogress = false;  // Unset the flag
+    unset($inprogress[$user->id]);  // Unset the flag
 }