Browse Source

Fix #348 Remove userid from thirdpartyemails list during delete for users.

MOODLE_36_STABLE
Dan Marsden 6 years ago
parent
commit
bc52a40f07
  1. 12
      classes/privacy/provider.php

12
classes/privacy/provider.php

@ -244,6 +244,18 @@ final class provider implements
$inparams $inparams
); );
// Get list of warning_done records and check if this user is set in thirdpartyusers.
foreach ($userids as $userid) {
$sql = 'SELECT DISTINCT w.*
FROM {attendance_warning} w
JOIN {attendance_warning_done} d ON d.notifyid = w.id AND d.userid = ?';
$warnings = $DB->get_records_sql($sql, array($userid));
if (!empty($warnings)) {
attendance_remove_user_from_thirdpartyemails($warnings, $userid);
}
}
$DB->delete_records_select( $DB->delete_records_select(
'attendance_warning_done', 'attendance_warning_done',
"userid $insql", "userid $insql",

Loading…
Cancel
Save