WordPress.org

Ready to get started?Download WordPress

Forums

Limit Login Attempts
Integrating Limit Login Attempts Plugin to Custom Login (10 posts)

  1. InterTrade
    Member
    Posted 2 years ago #

    Hi There,

    I came across your plugin and it looks like it does a great job on the WordPress login page. The problem is that I have a site that is custom programmed to create a custom login page using the standard WP function wp_signon(). When I login using this method, it appears that your plugin error messages do not get integrated into the WP_Error message stream. What can I do (what actions or filters can I apply) so that your plugin will function using the wp_signon() method?

    http://wordpress.org/extend/plugins/limit-login-attempts/

  2. InterTrade
    Member
    Posted 2 years ago #

    OK... I take it from the silence that you have no idea how to address this issue?

  3. InterTrade
    Member
    Posted 2 years ago #

    Hello...

    I see you are back. Do you have any help for me on this issue?

    Thanks!

  4. johanee
    Member
    Plugin Author

    Posted 2 years ago #

    Hi, sorry for the long silence!

    The requirements for a custom login page is:
    - call do_action('login_head'); in the header
    - if there are any errors they must be filtered using something similar to: $errors = apply_filters('login_errors', $errors);

    Good luck!

  5. InterTrade
    Member
    Posted 2 years ago #

    Hi and thanks for the reply!

    I did as you suggested by placing do_action('login_head') into the header and ran a standard wp_error routine before it as below:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    But I am still not getting any indication that your plugin is working to block the attempts, nor do I get a number of attempts readout.

  6. johanee
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    How it works:
    * the error object returned from wp_signon() on a failed login will include our error message
    * when displaying the login page otherwise you can get the retries information either by calling limit_login_get_message() directly or by using the global $error like wp-login.php.

    Try something like the following pseudo-code:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

  7. InterTrade
    Member
    Posted 2 years ago #

    Hi johanee,

    Thanks a million. The limit_login_get_message() function works like a charm. The only problem I am seeing now is that apparently my custom page is not being monitored by the plugin. No matter what I do, it always shows "3 attempts remaining."

    Is there something that I should be doing on this page that will cause the plugin to monitor the signons via wp_signon()?

  8. johanee
    Member
    Plugin Author

    Posted 2 years ago #

    wp_signon() should work out of the box. I'm not sure what the trouble is. If you send a copy of your login page to johan.eenfeldt@kostdoktorn.se I'll check it out.

  9. InterTrade
    Member
    Posted 2 years ago #

    Hi johanee,

    I sent an email to the email address on 6/6, but I have yet to hear from you. I sent a new email today with another copy of the code if you by chance did not get it. If you do not get it, please check your junk mail.

    Thanks!

  10. Nio
    Member
    Posted 1 year ago #

    I use this:

    <?php
    global $error;
    $referrer = $_GET['login'];
     if ($referrer == 'false'){
    	echo '<div id="message" class="error"><p>';
    	echo $error;
    	echo '</p></div>';
     } else {
     }
    ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic