Viewing 7 replies - 1 through 7 (of 7 total)
  • Reasoning aside

    Then I’ll assume you understand the dangers of doing this…

    The “link” would need to pass through as a POST, not a GET. So you could set up a form along the lines of:

    <form name="loginform" action="https://mysite/wp-login.php" method="post">
    <input type="hidden" name="log" value="USERNAME" />
    <input type="hidden" name="pwd" value="PASSWORD" />
    <input type="submit" name="submit" value="Login" />
    </form>

    and just so ya know hidden values show up when viewing the source. They’re not ‘that’ kind of hidden.

    To reiterate:

    Then I’ll assume you understand the dangers of doing this…

    Auto-login linking is a very bad way to make things easy on yourself, but if you must…

    Thread Starter libref

    (@libref)

    Thanks all!

    The link I’m proposing would be placed inside an admin area of our web site which requires authentication – I’d never do this otherwise ??

    Follow-up question:
    We have several blogs on our site, is it possible to set this up using a drop-down list to allow administrators to select which blog to login to; something like this:

    <FORM NAME=”BlogAdminPages”>
    <SELECT NAME=”Blog” SIZE=”1″>
    <OPTION VALUE=”/blog1/wp-login.php?log=&pwd=”> Blog 1
    <OPTION VALUE=”/blog2/wp-login.php?log=&pwd=”> Blog 2
    <OPTION VALUE=”/blog3/wp-login.php?log=&pwd=”> Blog 3
    </SELECT>
    <INPUT TYPE=”button” OnClick=”showSitePage(this.form)”>
    </FORM>

    Cheers,
    GB.

    is it possible to set this up …

    youve got the code right there, why not just try it.

    Thread Starter libref

    (@libref)

    Hi,

    Problem is, when I use a link like:

    https://sitename/blogname/wp-login.php?log=admin&pwd=password

    …it just throws up the WordPress login screen rather than going right into the Admin section. Any idea what might be wrong with the syntax?

    Thanks,
    GB.

    You want to POST, not GET, as kafkaesqui mentioned earlier.

    A google search will turn up some tutorials for using javascript to do form posting.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘creating a link to automatically login to WordPress’ is closed to new replies.