WordPress.org

Ready to get started?Download WordPress

Forums

Login LockDown
[resolved] Fixing deprecated errors (5 posts)

  1. dave1010
    Member
    Posted 6 months ago #

    Here's a diff you can apply to remove calls to deprecated functions.

    @mvandemar are you able to make these changes to the plugin?

    diff a/login-lockdown/loginlockdown.php b/login-lockdown/loginlockdown.php
    --- a/login-lockdown/loginlockdown.php
    +++ b/login-lockdown/loginlockdown.php
    @@ -165,9 +165,9 @@ function isLockedDown() {
            $ip = $_SERVER['REMOTE_ADDR'];
            $class_c = substr ($ip, 0 , strrpos ( $ip, "." ));
    
    -       $stillLocked = $wpdb->get_var("SELECT user_id FROM $table_name " .
    +       $stillLocked = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM $table_name " .
                                            "WHERE release_date > now() AND " .
    -                                       "lockdown_IP LIKE '" . $wpdb->escape($class_c) . "%'");
    +                                       "lockdown_IP LIKE %s",  $class_c . '%'));
    
            return $stillLocked;
     }
    @@ -333,7 +333,7 @@ if ( isset($loginlockdown_db_version) ) {
                            return $error;
                    }
    
    -               $userdata = get_userdatabylogin($username);
    +        $userdata = get_user_by('login', $username);
    
                    if ( !$userdata ) {

    http://wordpress.org/plugins/login-lockdown/

  2. mvandemar
    Member
    Plugin Author

    Posted 6 months ago #

    Yes, I am going to update it this week. Thank you.

  3. ciscovj
    Member
    Posted 6 months ago #

    is this the reason because Login Lockdown is blocking ip's server, and i can't enter to admin my website?

  4. mvandemar
    Member
    Plugin Author

    Posted 6 months ago #

    @ciscovj - I don't understand what you are asking. Login LockDown is supposed to block ip addresses from logging in, that is what it is designed to do. It is only supposed to block them under certain circumstances though, and without knowing what is going on in your case it would be difficult to tell. I can tell you that there are situations, such as in a local network environment where many people are all logging in to a remote server using the same ip address, where the effectiveness of Login LockDown is reduced (since 1 person locking themselves out can result in the whole office being locked out), although I have no idea if this relates to what you are experiencing. I also know that in the past people have contacted me thinking it was Login LockDown that was preventing them from loggin in when in fact it was some other plugin.

    If it is Login LockDown you should just be able to rename the folder via ftp, which will then allow you to log in normally, and then rename it back once you are logged in. Then you should be able to delete your ip address from the list of those blocked.

  5. mvandemar
    Member
    Plugin Author

    Posted 4 months ago #

    @dave1010 - Ok, so took longer than a week. :) I am almost done with the updates and should have them live tonight. Quick question though, in your code you have it thowing an error if $loginlockdown_db_version is set. Why is that?

    Thanks.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.