• Upon logging out you can sometimes get this message on a new page with the title ‘Something went wrong’ and body ‘You are attempting to log out of (WordPress website title). Do you really want to log out?’ where log out is a link.

    I am using the “wp_logout_url” to generate the URL:
    <a class="button-link" href="'. wp_logout_url('/login/') .'" style="text-decoration:none;">Log Out</a>

    The problem can be created merely by an user clicking upon the ‘logout’ link multiple times or having a couple of tabs open.

    I’m wondering if it’s possible to disable this warning on standard accounts (while perhaps keeping for admins and editors) or if it’s a matter of preventing multiple clicks (requests to the logout) on the button, etc?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello 3lancer,

    Can you please try using a different WordPress Function for this?

    Check this if it helps :

    https://codex.www.ads-software.com/Function_Reference/wp_loginout

    Thanks.

    Thread Starter 3Lancer

    (@3lancer)

    Hi kartiks16,

    Thanks for the suggestion. I’ve tested it, but same result (using TRUE or FALSE as the 2nd parameter). The URL generated matches 100%, only difference is it also adds ‘rel=nofollow’ to the A tag.

    Just try clicking on logout 10 times in a row, for example, before it does the redirect and actually logs out. It will come up with that “are you sure page?” every time. A single click on logout works fine, just want the possible multiple clicking issue to be avoided from doing that.

    • This reply was modified 5 years, 11 months ago by 3Lancer.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Logout (double session issue)’ is closed to new replies.