Provide a wp_saml_auth_pre_logout hook, custom wp_logout function never called
bwaltz opened this issue · 3 comments
bwaltz commented
I'm trying to do something simple such as remove a custom cookie in a plugin. Here's my function:
function logout_function($user_id) {
setcookie('ColbyAuth', '', time() - 3600);
}
add_action('wp_logout', 'logout_function');
but when the WP SAML Auth plugin is enabled this function is never called. I suspect this is because you're redirecting and calling the provider->logout() function before it gets called.
Is there a way you can provide a wp_saml_auth_pre_logout
hook or advise on the best way to have my function invoked?
danielbachhuber commented
bwaltz commented
That would do it! Thanks!
danielbachhuber commented
👍 Tagged v1.2.7 with the action.