Handle logout event in a plugin

(Toan Bao Nguyen) #1

I have written a plugin to check whether the user has logged in on my site and then press the Log in button on Discourse everytime the page is loaded (I am using WP Discourse for my wordpress website for SSO, but I cannot use the option “Automatically create and login users” due to CORS problem)
My problem is when user click logout on Discourse page, it reloads and run my script again to log in, is there any way to catch the logout event for me to set a flag to the browser cookie?

(Régis Hanol) #2

You should probably fix that instead of using your hack.