Skip to content

Commit

Permalink
MDL-66551 core_user: delete_user() should remove users calendar subs
Browse files Browse the repository at this point in the history
  • Loading branch information
lameze committed Sep 2, 2019
1 parent 310d690 commit 5a1fd6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/moodlelib.php
Expand Up @@ -4244,6 +4244,9 @@ function delete_user(stdClass $user) {

// Now do a brute force cleanup.

// Remove user's calendar subscriptions.
$DB->delete_records('event_subscriptions', ['userid' => $user->id]);

// Remove from all cohorts.
$DB->delete_records('cohort_members', array('userid' => $user->id));

Expand Down

0 comments on commit 5a1fd6e

Please sign in to comment.