mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-67494 calendar: user_delete_user should delete all user events
This commit is contained in:
parent
e5ce3297ba
commit
7108bf827d
1 changed files with 1 additions and 1 deletions
|
@ -4269,7 +4269,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 AND subscriptionid IS NOT NULL', ['userid' => $user->id]);
|
||||
$DB->delete_records_select('event', 'userid = :userid', ['userid' => $user->id]);
|
||||
|
||||
// Now, delete all calendar subscription from the user.
|
||||
$DB->delete_records('event_subscriptions', ['userid' => $user->id]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue