Forums

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

  1. InterTrade
    Member
    Posted 5 months 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 4 months ago #

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

  3. InterTrade
    Member
    Posted 2 days ago #

    Hello...

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

    Thanks!

  4. johanee
    Member
    Posted 1 day 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 1 day 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
    Posted 22 hours 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 hours 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()?

Reply

You must log in to post.

About this Plugin

About this Topic