From 76f7cdf54e3ee371bf9523ee48c1c6c160b49cfd Mon Sep 17 00:00:00 2001
From: Kevin Ullyott <ullyott.kevin@gmail.com>
Date: Mon, 30 Dec 2019 17:22:06 -0800
Subject: [PATCH] Add removed_user_from_blog action hook

Adds an action hook to remove_user_from_blog for after the succesful removal of a user from a blog

Signed-off-by: Kevin Ullyott <ullyott.kevin@gmail.com>
---
 src/wp-includes/ms-functions.php | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php
index 43325c0cac..1606faa944 100644
--- a/src/wp-includes/ms-functions.php
+++ b/src/wp-includes/ms-functions.php
@@ -303,7 +303,17 @@ function remove_user_from_blog( $user_id, $blog_id = '', $reassign = '' ) {
 		}
 	}
 
-	restore_current_blog();
+    /**
+	 * Fires after a user is removed from a site.
+	 *
+	 * @since MU (5.3.0)
+	 *
+	 * @param int $user_id User ID.
+	 * @param int $blog_id Blog ID.
+	 */
+    do_action( 'removed_user_from_blog', $user_id, $blog_id );
+
+    restore_current_blog();
 
 	return true;
 }
-- 
2.21.0 (Apple Git-122.2)

