Global login from frontpage and cookies?

Elite
  • 31 points
    Starting to get into this DEV thing
    I'm helpful
    Tomas

    Member  —  31st August 2011 09:28         

    Hi, I cannot seen to resolve this issue.
    We run a multi site where we have a login-form on the frontpage of blog id 1.

    <form action="<?php echo get_option('home'); ?>/wp-login.php" method="post">
    <input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="20" />
    <input type="password" name="pwd" id="pwd" size="20" /><br />
    <input id=signin_submit type="submit" name="submit" value="Login" class="button" />
        <p>
           <label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label>
           <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
           | <a href="<?php echo get_option('home'); ?>/wp-login.php?action=lostpassword">Lost password?</a>
        </p>
    </form>

    This works fine for logging in blog users and they arrive at their admin panels. However there seems to be an issues with cookies since when users or admin want's to comment on other siteblogs there's a need to fill out all details (email etc).
    I have tried to set the following in wp-config.php but does not help:

    define('COOKIE_DOMAIN', '.ourdomain.tld');
    define('COOKIEPATH', '/');
    define('SITECOOKIEPATH', '/');

    How can I resolve this?

    Thank you