mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-39802 ignore deleted users in meta enrolments
This commit is contained in:
parent
a23fe90d18
commit
f3bd4ea6ec
1 changed files with 1 additions and 0 deletions
|
@ -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";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue