WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Why doesn't my login box work? (5 posts)

  1. omgwtf
    Member
    Posted 8 years ago #

    After recently updating to WP-RC2, my login box doesn't work as well as it used to. (it didn't work all too well before either...)

    <?php
    /*
    Plugin Name: SUPER AWESOME LOGIN BOX
    Version: 0.2 alpha gama
    Plugin URI: http://www.SDOIMFSF.com
    Description: Shows a login box
    Author: Me
    Author URI: http://www.SDOIMFSF.com

    */
    // AWESOME LOGIN BOX
    // version 0.2 alpha gama
    //
    // This is an add-on for WordPress
    // http://wordpress.org/
    //
    // **********************************************************************
    // This program is distributed in the hope that it will be useful, but
    // WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    // *****************************************************************

    add_action('wp_meta', 'loginBox');

    function loginBox(){

    global $user_nickname;
    global $user_ID;

    get_currentuserinfo();
    if (empty($user_nickname))
    {
    print("<form action=\"".get_settings('siteurl')."/wp-login.php\"method=\"post\">
    <input type=\"hidden\" name=\"redirect_to\"value=\"".get_settings('siteurl')."/wp-admin/\" />
    <input type=\"hidden\" name=\"action\" value=\"login\" />
    <table width=\"100\">
    <tr>
    <td align=\"right\">
    login
    </td>
    <td>
    <input type=\"text\" name=\"log\" value=\"\" size=\"8\" />

    </td>
    </tr>
    <tr>
    <td align=\"right\">
    password
    </td>
    <td>
    <input type=\"password\" name=\"pwd\" value=\"\" size=\"8\" />

    </td>
    </tr>
    <tr>
    <td>

    </td>
    <td>
    <input type=\"submit\" name=\"Submit\" value=\"Log me in!\"class=\"search\">
    </td>

    </tr>

    <tr>

    <td colspan=\"2\">
    <a href=\"".get_settings('siteurl')."/wp-register.php\">Register?</a><br />
    <a href=\"".get_settings('siteurl')."/wp-login.php?action=lostpassword\">Forgot your password?</a><br />
    </td>
    </tr>
    </table>
    </form>
    ");

    }

    else {
    print("
    <li><a href=\"".get_settings('siteurl')."/wp-admin\">Post an article</a></li>
    <li><a href=\"".get_settings('siteurl')."/wp-login.php?action=logout\">Logout</a> (not recommened)</li>

    ");

    }
    }

    ?>

  2. James
    Happiness Engineer
    Posted 8 years ago #

    Have you contacted the developer of "SUPER AWESOME LOGIN BOX"? Is the plugin compatible with WP v2.0? Why can't you use the default login page?

  3. omgwtf
    Member
    Posted 8 years ago #

    1) Because I made the super awesome login box!
    I'm not much of a coder, but I managed to make it.

    2)It worked with any version before 2.0 - and that's why I'm asking here why it isn't working anymore after upgrading to 2.0!

    3) Because I want to log in via my site - not a seperate. and I want to make some "if logged in only" features.

  4. vkaryl
    Member
    Posted 8 years ago #

    Hm. In that case, you're the plugin author, and it's pretty much up to you to make sure your plugin works with the new version. Hard to say where it might have gone wrong....

  5. omgwtf
    Member
    Posted 8 years ago #

    I found the problem. user_nickname doesn't exist anymore!
    Sorry for wasting all your time

Topic Closed

This topic has been closed to new replies.

About this Topic