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 10 replies - 1 through 10 (of 10 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.

    Thread Starter 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.

    Thread Starter 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

    Hi,
    we use plugin IP based login and it’s work perfectly: in my IP range, plugin auto-logged all users in a specific user_login “John Doe”.
    But in that IP range, we have the necessity to have a exception:
    the wp user with user_login “Charles Smith” that will NOT be logged as user_login “John Doe”.
    However, all other users must be logged in user_login “John Doe”, as is set in plugin configuration.
    So could you help me? Should I use the is_logged_in_using_ipbl() function?
    Thanks

    Plugin Author brijeshk89

    (@brijeshk89)

    Yes you can use the function is_logged_in_using_ipbl or once you are logged in as the user John Doe in the admin top bar you will see a text “Logged in using IP Based Login” hover on that link and you will see the option to disable auto login for 5 minutes, 15 minutes and 30 minutes. You can disable the auto login using these options and then manually login to Charles Smith

    Sorry but it doesn’t work: if I try to click “disable auto login for 15 minutes” my account is still logged.
    If I logout, automatically login with the previous user. I can’t switch user login.
    I need that the specific user “Charles Smith” can logout from auto login user “John Doe” and fresh log with his own credentials.
    It’s possible?

    Plugin Author brijeshk89

    (@brijeshk89)

    Hi,

    What you need is exactly what that feature does.

    Are you accessing this in a private/incognito window ?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘User access outside IP range?’ is closed to new replies.