After upgrading a site from a 2.3.3 version to 2.7.1, the login widget in a sidebar that worked just fine previously is now misbehaving.
The login stuff works as expected. However, after login, this element returns hidden links for logged in users only....
For example: logout. But strangely, this logout now takes you to a place that says:
You are attempting to log out of [site name]
Please try again.
and there's nothing to click to try again... this is a development site, so I can still try the login/out on the live site and it's working fine (the older version of WordPress)
Here is my code:
<?php
global $user_ID, $user_identity;
get_currentuserinfo();
if (!$user_ID):
?>
<h2 class="sbsection"><?php _e('Log In »'); ?></h2>
<form name="loginform" id="loginform" action="<?php echo get_settings('siteurl'); ?>/wp-login.php" method="post">
<div>
<label for="log"><?php _e('Username') ?>:</label>
<input type="text" name="log" id="log" value="" />
<label for="pwd"><?php _e('Password') ?>:</label>
<input type="password" name="pwd" id="pwd" value="" />
<label for="submit"></label>
<input type="submit" name="submit" value="<?php _e('Login'); ?> »" />
<a href="http://dev.example.net/wp-login.php?action=lostpassword">Lost Password?</a><?php wp_register('', ''); ?>
<a href="index.php?page_id=47">Contact Us</a>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>"/></div>
</form>
<?php
else:
?>
<h2 class="sbsection"><?php _e('Logged In »'); ?></h2>
<ul id="RU">
<li><em>as: </em><?php echo $user_identity; ?></li>
<li><a href="http://dev.example.net/wp-admin/profile.php">My Profile</a></li>
<li><a href="<?php echo get_settings('siteurl') . '/wp-login.php?action=logout&redirect_to=' . $_SERVER['REQUEST_URI']; ?>"><?php _e('Logout'); ?></a></li>
<li><a href="index.php?page_id=47">Contact Us</a></li>
</ul>
<?php
endif;
?>
(please realize that the ampersands are being converted)
Any ideas, anyone?