MDL-71182 calendar: Revert "Merge branch 'MDL-67494-311' of git://github.com/lameze/moodle into MOODLE_311_STABLE"

This reverts commit 9f5794834e, reversing
changes made to d30b045210.
This commit is contained in:
Simey Lameze
2021-03-24 09:18:16 +08:00
parent 7fb15daff2
commit 41cbdeccab
14 changed files with 339 additions and 325 deletions
+1 -1
View File
@@ -4110,7 +4110,7 @@ function delete_user(stdClass $user) {
// Now do a brute force cleanup.
// Delete all user events and subscription events.
$DB->delete_records_select('event', 'userid = :userid', ['userid' => $user->id]);
$DB->delete_records_select('event', 'userid = :userid AND subscriptionid IS NOT NULL', ['userid' => $user->id]);
// Now, delete all calendar subscription from the user.
$DB->delete_records('event_subscriptions', ['userid' => $user->id]);