From 4b07ec2496fbfd0bd5f35d2e9e538adeec4dea55 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Wed, 8 Dec 2021 15:14:19 -0800 Subject: [PATCH] Add `wp_saml_auth_pre_logout` action to fire before logout --- inc/class-wp-saml-auth.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/class-wp-saml-auth.php b/inc/class-wp-saml-auth.php index a8b3146..4dd87ac 100644 --- a/inc/class-wp-saml-auth.php +++ b/inc/class-wp-saml-auth.php @@ -177,6 +177,10 @@ public function action_login_message( $message ) { * Log the user out of the SAML instance when they log out of WordPress */ public function action_wp_logout() { + /** + * Fires before the user is logged out. + */ + do_action( 'wp_saml_auth_pre_logout' ); $provider = $this->get_provider(); if ( 'internal' === self::get_option( 'connection_type' ) ) { $internal_config = self::get_option( 'internal_config' );