PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.11.0
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.11.0
2.11.0 2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 All 78 releases
← All changes | Modules/Migrations/Helpers/BPMigratorHelper.php +21 -0 2.6.02.11.0 View file →
@@ -392,8 +392,9 @@
392 392
393 393 $xprofile = $user->xprofile;
394 394 // Let's sync the cover photo and avatar
395 395 if (!$xprofile->hasCustomAvatar()) {
396 + /** @phpstan-ignore argument.type (BuddyPress overrides get_avatar_url with different signature; WP stub doesn't match BP variant) */
396 397 $avatar = get_avatar_url($user->ID, 'full', true);
397 398
398 399 $coverPhoto = bp_attachments_get_attachment(
399 400 'url',
@@ -620,8 +621,26 @@
620 621 }
621 622
622 623 public static function deleteCurrentData()
623 624 {
625 + // Capture an audit context before the wipe so this destructive erasure of member PII is
626 + // traceable (who/when/how much) and downstream modules can purge remote copies.
627 + $auditContext = [
628 + 'user_id' => get_current_user_id(),
629 + 'timestamp' => current_time('mysql'),
630 + 'counts' => [
631 + 'feeds' => \FluentCommunity\App\Models\Feed::count(),
632 + 'comments' => \FluentCommunity\App\Models\Comment::count(),
633 + 'reactions' => \FluentCommunity\App\Models\Reaction::count(),
634 + 'media' => \FluentCommunity\App\Models\Media::count(),
635 + 'activities' => \FluentCommunity\App\Models\Activity::count(),
636 + 'profiles' => \FluentCommunity\App\Models\XProfile::count(),
637 + 'spaces' => \FluentCommunity\App\Models\Space::where('type', 'community')->count(),
638 + ],
639 + ];
640 +
641 + do_action('fluent_community/migration/before_delete_current_data', $auditContext);
642 +
624 643 // delete the folder in uploads folder fluent-community with php please
625 644 $uploadDir = wp_upload_dir();
626 645 $fcomDir = $uploadDir['basedir'] . '/fluent-community';
627 646 if (is_dir($fcomDir)) {
@@ -645,8 +664,10 @@
645 664 delete_option('_bp_fcom_group_maps');
646 665 delete_option('_bp_fcom_last_post_id');
647 666 delete_option('_bp_fcom_last_user_id');
648 667 delete_option('_bp_fcom_last_migrated_member_id');
668 +
669 + do_action('fluent_community/migration/after_delete_current_data', $auditContext);
649 670 }
650 671
651 672 public static function getFcomSpaceIdByGroupId($bbGroupId)
652 673 {