The MU forums have moved to WordPress.org

Problems with logging out (6 posts)

  1. AndrewGerssen
    Member
    Posted 12 years ago #

    On a single post/page in the comment section I have the option to logout. Within the wp-admin pages I have no problem logging out, but from outside the wp-admin I cannot logout. I get an error message.

    The URL is as follows: /wp-login.php?action=logout

    Then I get an error message which says to try again.

    Well I looked into wp-login.php and on line 313 it tells me:

    check_admin_referer('log-out');

    And if I check this function in the function reference:

    http://codex.wordpress.org/Function_Reference/check_admin_referer

    I get the idea that you can only logout from the wp-admin pages, is that true? And if so, should it stay like that?

  2. AndrewGerssen
    Member
    Posted 12 years ago #

    *bump*

  3. dsader
    Member
    Posted 12 years ago #

    http://codex.wordpress.org/Function_Reference/wp_loginout

    <?php wp_loginout(); ?>

    Works from the template just fine as far as I can tell, header, sidebar, footer, comment.

    Check your template, what code is being used to generate the logout link?

    If you have something like
    <a href="/wp-login.php?action=logout">log out</a>
    change it to
    <?php wp_loginout(); ?>

  4. AndrewGerssen
    Member
    Posted 12 years ago #

    Great, thanks that was the problem!

  5. v2006
    Member
    Posted 12 years ago #

    Where do I insert the code in the general-template.php?
    I have the same problem with WP MU 2.8.6

    Would this be solved if I upgraded?

    Thanks

  6. skcsknathan001
    Member
    Posted 12 years ago #

    v2006,
    check your theme files

About this Topic

  • Started 12 years ago by AndrewGerssen
  • Latest reply from skcsknathan001