Showing as logged in after logout (W3 Total Cache issue)

I’ve got a login/logout link using wp_loginout(). After a user logs out their user info is still being shown by get_currentuserinfo(), only after they visit a second page does it revert to not showing any user info. They are, however actually, logged out after the initial logout (as they can’t access any protected pages).

If I disable the plugin I don’t experience this issue. How can I ensure that when a user logs out the change is reflected without having to visit a second page?

Read More

http://wordpress.org/extend/plugins/w3-total-cache/

Related posts

Leave a Reply

2 comments

  1. As the commenters have alluded to, this is a “feature” of using cookies. Changes to cookies are only enacted on the next page refresh.

    You could try adding an extra page refresh (which will make the users browser page flash) or you could add some JavaScript to destroy the cookie dynamically.