From 58fd20c587b0041a1188d6ca98f82ce96e6821f7 Mon Sep 17 00:00:00 2001 From: ebauv3 <103200865+ebauv3@users.noreply.github.com> Date: Fri, 24 Apr 2026 18:14:38 +0200 Subject: [PATCH] fix user being not logged out of wordpress after SLO --- php/functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/php/functions.php b/php/functions.php index cc2a366..e32cb0c 100644 --- a/php/functions.php +++ b/php/functions.php @@ -202,6 +202,10 @@ function saml_slo() { wp_redirect(home_url()); exit(); } + // fixes user not being logged out of wordpress after saml logout + wp_destroy_current_session(); + wp_clear_auth_cookie(); + $auth->logout(home_url(), array(), $nameId, $sessionIndex, false, $nameIdFormat, $nameIdNameQualifier, $nameIdSPNameQualifier); return false; }