Support » Plugin: IP Based Login » User access outside IP range?

  • Resolved Mike

    (@shakingpaper)


    We leverage this plugin for institutions to freely access our content within an IP range. Using is_logged_in_using_ipbl(), we hide the login/my account links as the institution users wouldn’t need to access this.

    What I am wondering is, is it possible to show these buttons for the user assigned to the IP range when they are outside of the IP range so they can administer the account?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author brijeshk89

    (@brijeshk89)

    Hi Mike,

    Sorry I didn’t get what exactly you need. Can you please explain again ?

    The function is_logged_in_using_ipbl will not be called when the person is outside the ip range so the buttons should appear as it is.

    Mike

    (@shakingpaper)

    Thanks for responding so quickly.

    I’m referring to the logged-in state of the buttons for a user who has their username assigned to an IP range. I’m trying to work out the right variables so that the user can still access the buttons (that link to ‘My Account’ and ‘Log Out’) when they log in regularly outside of the IP range.

    Plugin Author brijeshk89

    (@brijeshk89)

    Hi,

    When the user is logged into their account but not within the IP range allowed the function is_logged_in_using_ipbl() will return false.

    So you can use this function as follows :

    if(is_logged_in_using_ipbl()){
    // do something to hide the links/buttons
    }else{
    // do nothing and the my account and logout button will be visible
    }

    Let us know if you face any issues.

    Plugin Author brijeshk89

    (@brijeshk89)

    Hi,

    Just wanted to check if you were able to achieve what you needed.

    Mike

    (@shakingpaper)

    Apologies for the late response. It was a code error on my end — so sorry to waste your time.

    Also: can you point me to a donation link? The link in the plugin is no longer there.

    Plugin Author brijeshk89

    (@brijeshk89)

    Hi,

    Glad to know you got it working !

    You can send the donation to my PayPal account sales@wpinspired.com 🙂

    It would be great if you could write a small review about the plugin here :
    https://wordpress.org/support/plugin/ip-based-login/reviews/#new-post

    Regards,
    Brijesh Kothari

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.