Changed the flag to be on a given user basis (just in case it gets called

for a lot of users)
This commit is contained in:
moodler
2006-09-25 01:42:41 +00:00
parent 0ee186d9ca
commit 218eb65122
+3 -3
View File
@@ -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
}