diff --git a/lib/models/User.class.php b/lib/models/User.class.php index 7eb13218177ef5c464bcb651f24992a2b150e5df..70b44766f2ffc26f204d8caa5778b1edbc41b6e5 100644 --- a/lib/models/User.class.php +++ b/lib/models/User.class.php @@ -1267,10 +1267,13 @@ class User extends AuthUserMd5 implements Range, PrivacyObject // Consultations $query = "UPDATE IGNORE consultation_blocks SET range_id = ? WHERE range_id = ? AND range_type = 'user'"; DBManager::get()->execute($query, [$new_id, $old_id]); - $query = "UPDATE IGNORE consultation_blocks SET teacher_id = ? WHERE teacher_id = ?"; - DBManager::get()->execute($query, [$new_id, $old_id]); $query = "UPDATE IGNORE consultation_bookings SET user_id = ? WHERE user_id = ?"; DBManager::get()->execute($query, [$new_id, $old_id]); + $query = "UPDATE IGNORE consultation_events SET user_id = ? WHERE user_id = ?"; + DBManager::get()->execute($query, [$new_id, $old_id]); + $query = "UPDATE IGNORE consultation_responsibilities SET range_id = ? WHERE range_id = ? + AND range_type = 'user'"; + DBManager::get()->execute($query, [$new_id, $old_id]); NotificationCenter::postNotification('UserDidMigrate', $old_id, $new_id);