Fernando Yet To Die
Member
Posted 5 months ago #
Hi everyone!
Happy New Year!
Every time I login or logout, it works fine if I am browsing from domain.com/blog. However, if I am at http://www.domain.com/blog, or domain.com I lose my login data, and users show as not logged in... And once they press LOGIN, nothing happens, as if it was broken.
So, this means, the login only works if users are browsing at domain.com/blog
How can I fix this, so it works and settings save the login/keep people logged in, when they browse using http://www.domain.com/blog?
Fernando Yet To Die
Member
Posted 5 months ago #
May I add I have tested this with the default wordpress theme, as well as my own login code below:
<div id="login-box">
<?php
if (!(current_user_can('level_0')))
{
?>
<h2>Member's Login</h2>
<form action="http://domain.com/blog/wp-login.php" method="post">
<div id="login-box-input">Username: <input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="20" /><br />
Password: <input type="password" name="pwd" id="pwd" size="20" value="" /><br />
<label for="rememberme"> <input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember</label></div>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" /><br />
<input type="submit" name="submit" value="Send" class="button" />
</form>
<a href="http://domain.com/blog/wp-login.php?action=lostpassword">Lost Password?</a>
<div id="login-box-register">
<a href="http://domain.com/blog/wp-login.php?action=register">REGISTER!</a>
</div>
<?php
}
else
{
?>
<h2>Welcome!</h2>
<div id="login-box-input"><span class="personal-menu">
<?php
global $user_identity;
get_currentuserinfo();
echo('' . $user_identity . '');
?>
<br>
This is your Personal Menu<br>
<a href="http://domain.com/blog/wp-admin/">Admin Panel</a><br>
<?php wp_loginout(); ?></span>
</div>
<?php
}
?>
</div> <!-- / login-box-input -->
Fernando Yet To Die
Member
Posted 4 months ago #
Awww nobody is helping :(
Fernando Yet To Die
Member
Posted 3 months ago #