Skip to content

Commit

Permalink
MDL-39802 ignore deleted users in meta enrolments
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed May 24, 2013
1 parent 761227c commit 5878ac3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions enrol/meta/locallib.php
Expand Up @@ -435,6 +435,7 @@ function enrol_meta_sync($courseid = NULL, $verbose = false) {
FROM {user_enrolments} pue
JOIN {enrol} pe ON (pe.id = pue.enrolid AND pe.enrol <> 'meta' AND pe.enrol $enabled)
JOIN {enrol} e ON (e.customint1 = pe.courseid AND e.enrol = 'meta' $onecourse)
JOIN {user} u ON (u.id = pue.userid AND u.deleted = 0)
LEFT JOIN {user_enrolments} ue ON (ue.enrolid = e.id AND ue.userid = pue.userid)
WHERE ue.id IS NULL";

Expand Down

0 comments on commit 5878ac3

Please sign in to comment.