• Resolved dave1010

    (@dave1010)


    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/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Yes, I am going to update it this week. Thank you.

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

    @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.

    @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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fixing deprecated errors’ is closed to new replies.