Support » Plugin: Limit Login Attempts » Whitelist unclear to me

  • Resolved Magistar


    Is there someone willing to explain the whitelist functionality listed in the faq?

    function my_ip_whitelist($allow, $ip) { return ($ip == ‘my-ip’) ? true : $allow; } add_filter(‘limit_login_whitelist_ip’, ‘my_ip_whitelist’, 10, 2);

    I have no clue what the 10 and 2 flags are for. I assume I should replace “my_ip_whitelist” with my ip?

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Magistar,

    No, leave ‘my_ip_whitelist’ as is.
    But you do need to replace ‘my-ip’ with your actual IP (keep the single quotes though).

    The code behind this filter will check if the visiting IP is yours. If that’s the case, it will skip monitoring failed login attempts for that session.

    The 10 indicates the priority for running this filter and the 2 tells how many arguments are accepted by the my_ip_whitelist function.

    – Benny

    Ok that was really helpfull. Thanks Benny.

    Just a note that there is also a plugin Whitelist for LLA, that allows you to easily add IP’s for admins.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Whitelist unclear to me’ is closed to new replies.