• Resolved demonboy

    (@demonboy)


    Just done a search for this and it seems people are having a problem logging in. I can do that ok but I can’t log out! I’m using the comments part of the page to do this, which takes me to the https://www.followtheboat.com/wp-login.php?action=logout. The page title says ‘WordPress Failure Notice’ and the page says “You are attempting to log out of….(blank line). Please try again”.

    I presume the blank line is because I have not filled in the title of my blog (I don’t want the html title link at the top of my page).

    Does anyone have any clues?

Viewing 9 replies - 16 through 24 (of 24 total)
  • Hai cool guys,
    I dont know about about wpmu but am using wp 2.7
    and i was having a problem with logout…
    When user clicks on logout its get redireted to the home page but user is still logged

    in…
    It displays the msg

    “You Attempting to logout of the siteurl
    Please try again”

    where please try again is a hyperlink and when the user clickc it just redirection to

    the home page occurs without loggingout….

    However I was able resolve this using the following steps…

    1)My logout links comes from a plugin called
    “usersidebarpanel”
    the path to it seems something like

    “wp-content\plugins\usersidebarpanel”

    2)Inside usersidebarpanel there is a file called as
    “functions.php”

    3)edit this file as follows

    In this page somewhere about lines 61,93,100
    there is a piece of code as given below

    echo ‘

    • <a

      href=”‘.get_bloginfo(‘wpurl’).’/wp-login.php?action=logout&redirect_to=’.get_option(

      ‘siteurl’).'” title=”‘.$usp_language[‘logout’].'”

      >’.$usp_language[‘logout’].’

    • ‘;

    4)Replace This code with the following code given below

    echo ‘

  • <a href=”‘.wp_logout_url(get_permalink()).'”

    title=”‘.$usp_language[‘logout’].'” >’.$usp_language[‘logout’].’

  • ‘;

    5)Thats it and check out…

    Here’s what worked for me, I looked at the comments template of my theme (comments.php) and found:

    <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout &raquo;</a></p>

    Which I replaced with (as subzane and mrmist pointed out):

    <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(); ?>" title="Log out of this account">Logout &raquo;</a></p>

    I saved the changes and it worked.

    Edited out — new post below.

    I  cannot find a way to make this work! I also cannot logout of my blog, nor allow my users to logout. When I try to put in this line:
    
    <a href="<?php echo wp_logout_url(); ?>">Logout</a>
    
    It just turns the code into part of the URL.
    
    Here is the pertinent part of my usless theme code that puts in the Logout link:
    
    <?php
    						global $user_ID;
    						if($user_ID) {
    							echo '<li class="secondary"><a href="' . site_url('wp-login.php?action=logout', 'login') . '">' . __('Log Out', 'carrington') . '</a></li>';
    						} else {
    							echo '<li class="secondary"><a href="' . site_url('wp-login.php', 'login') . '">' . __('Log In', 'carrington') . '</a></li>';
    						}
    						 ?>
    
    How do I change it so that you can actually logout? No use of this line of code as is seems to work at all!

    Here is my solution for automatic loging out from wp 2.7:

    <a href="<?php echo wp_logout_url().'&amp;action=logout&amp;redirect_to='.$_SERVER['REQUEST_URI']; ?>">Logout</a>

    I was having this issue on a clients site – I disabled the Branded Admin plug in (https://kerrywebster.com/my-current-plugins/) and it all works again.

    So, if you are having issues try going through you’re plugins and disabling them one at a time then try to log out.

    Worked for me.

    Hi. I just had the same “You are attempting to log out of (website name)” problem in WP 2.7 and found a simplest solution, I think.

    As you know the URL of this page is similar to
    (web root)/wp-login.php?action=logout&wpnonce=(numbers)
    Well, I just went to
    (web root)/wp-login.php?action=logout
    deleting the “&wpnonce=(numbers)”, and cliked on the link that asks if you really want to close your session.
    And the problem is gone away forever!

    rodriguex,
    thank you. this got my old theme up to date! helpful string overall as well. thank you all. wordpress is great.

    Solved
    Just replace the code <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" in your old theme (comments.php) for:
    <a href="<?php echo wp_logout_url(get_permalink()); ?>"
    This fix my problem.

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘WP 2.7 Can’t Log Out’ is closed to new replies.