Whitelist IP Address Feature?
-
Hi,
I know you answered this question 6 months ago.
However I’d be very happy to see a whitelist added to the plugin.I tried to do add it myself by looking up within function isLockedDown().
1. My idea was to add a third table say $wpdb->prefix . “lockdowns_whitelist”.
Then do something like :$white_table_name = $wpdb->prefix . "lockdowns_whitelist"; $white_subnet = calc_subnet($_SERVER['REMOTE_ADDR']); $whitelistedquery = "SELECT user_id FROM $white_table_name " . "WHERE ip = %s"; $whitelistedquery = $wpdb->prepare($whitelistedquery,$white_subnet[0] . "%"); $whiteListed = $wpdb->get_var($whitelistedquery);
2. Then compare both $stillLocked to $whiteListed.
Something like :if ($whiteList) { return false; } else { return $stillLocked; }
However this doesn’t work.
I think I don’t get how function calc_subnet() works.Would you have any insight for me?
This feature would really help a lot, as I’m regularly not being able to log in and have to use a VPN to circumvent.
Thank you for your feedback.
- The topic ‘Whitelist IP Address Feature?’ is closed to new replies.