mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-79996 communication: valid instance checks during user deletion.
This commit is contained in:
parent
e4d1369475
commit
73143443b8
@ -4113,8 +4113,10 @@ function delete_user(stdClass $user) {
|
||||
instancetype: 'coursecommunication',
|
||||
instanceid: $course->id,
|
||||
);
|
||||
$communication->get_room_user_provider()->remove_members_from_room([$user->id]);
|
||||
$communication->delete_instance_user_mapping([$user->id]);
|
||||
if ($communication !== null) {
|
||||
$communication->get_room_user_provider()->remove_members_from_room([$user->id]);
|
||||
$communication->delete_instance_user_mapping([$user->id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user