diff --git src/bp-blogs/bp-blogs-functions.php src/bp-blogs/bp-blogs-functions.php
index c10af26..35e4f4d 100644
--- src/bp-blogs/bp-blogs-functions.php
+++ src/bp-blogs/bp-blogs-functions.php
@@ -1422,3 +1422,33 @@ function bp_blogs_remove_data( $user_id ) {
 add_action( 'wpmu_delete_user',  'bp_blogs_remove_data' );
 add_action( 'delete_user',       'bp_blogs_remove_data' );
 add_action( 'bp_make_spam_user', 'bp_blogs_remove_data' );
+
+/**
+ * Restore all blog associations for a given user
+ *
+ * @since BuddyPress (2.2.0)
+ *
+ * @param  int $user_id ID whose blog data should be restored.
+ * @uses   get_blogs_of_user() Get the blogs a user belongs to.
+ * @uses   bp_blogs_add_user_to_blog() Record a user's association with a blog.
+ * @return bool|null Returns false on failure.
+ */
+function bp_blogs_restore_data( $user_id = 0 ) {
+	if ( ! is_multisite() ) {
+		return false;
+	}
+
+	// Get the user's blogs
+	$user_blogs = get_blogs_of_user( $user_id );
+
+	if ( empty( $user_blogs ) ) {
+		return false;
+	}
+
+	$blogs = array_keys( $user_blogs );
+
+	foreach ( $blogs as $blog_id ) {
+		bp_blogs_add_user_to_blog( $user_id, false, $blog_id );
+	}
+}
+add_action( 'bp_make_ham_user', 'bp_blogs_restore_data', 10, 1 );
diff --git tests/phpunit/testcases/blogs/functions.php tests/phpunit/testcases/blogs/functions.php
index b2ee4eb..82b34c6 100644
--- tests/phpunit/testcases/blogs/functions.php
+++ tests/phpunit/testcases/blogs/functions.php
@@ -280,6 +280,45 @@ class BP_Tests_Blogs_Functions extends BP_UnitTestCase {
 	}
 
 	/**
+	 * @group bp_blogs_restore_data
+	 */
+	public function test_bp_blogs_restore_data() {
+		if ( ! is_multisite() ) {
+			return;
+		}
+
+		// Create a regular member
+		$u = $this->factory->user->create();
+
+		// Create blogs
+		$b1 = $this->factory->blog->create( array( 'user_id' => $u, 'path' => '/b1_blogs_restore' ) );
+		$b2 = $this->factory->blog->create( array( 'user_id' => $u, 'path' => '/b2_blogs_restore' ) );
+
+		$expected = array(
+			$b1 => $b1,
+			$b2 => $b2
+		);
+
+		// Mark the user as spam
+		bp_core_process_spammer_status( $u, 'spam' );
+
+		// get all blogs for user
+		$blogs = bp_blogs_get_blogs_for_user( $u, true );
+		$blog_ids = wp_list_pluck( $blogs['blogs'], 'blog_id' );
+
+		$this->assertNotEquals( $expected, array_map( 'intval', $blog_ids ), 'User marked as spam should not have any blog registered' );
+
+		// Ham the user
+		bp_core_process_spammer_status( $u, 'ham' );
+
+		// get all blogs for user
+		$blogs = bp_blogs_get_blogs_for_user( $u, true );
+		$blog_ids = wp_list_pluck( $blogs['blogs'], 'blog_id' );
+
+		$this->assertEquals( $expected, array_map( 'intval', $blog_ids ) );
+	}
+
+	/**
 	 * @group bp_blogs_catch_transition_post_status
 	 */
 	public function test_transition_post_status_publish_to_publish() {
