Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-28348 prevent circular references in meta handler for enrolments

  • Loading branch information...
commit ebbc9e717f31bd1c2634963b1c279675f8a38238 1 parent 617027c
@skodak skodak authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 enrol/meta/locallib.php
View
5 enrol/meta/locallib.php
@@ -128,6 +128,11 @@ public function user_enrolled($ue) {
return true;
}
+ if ($ue->enrol === 'meta') {
+ // prevent circular dependencies - we can not sync meta enrolments recursively
+ return true;
+ }
+
// does anything want to sync with this parent?
if (!$enrols = $DB->get_records('enrol', array('customint1'=>$ue->courseid, 'enrol'=>'meta'), 'id ASC')) {
return true;
Please sign in to comment.
Something went wrong with that request. Please try again.