Support » Plugin: IP Based Login » Test PHP for logged users

  • Resolved bbr13

    (@bbr13)


    Hi,

    Is it possible in PHP code of a page to insert a test in order to check if the user is logged via “IP Based Login” or via “login + password” ?

    Thank you to replay,
    Regards,
    Bruno Bros

    The page I need help with: [log in to see the link]

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

    (@brijeshk89)

    Hi,

    Unfortunately at the moment this is not possible.

    However the user does see a message in the admin panel top bar that he was logged in with IP Based Login plugin.

    ok thank you.
    I have to display a special information message if the user is logged with “IP Based Login”.
    The information in the admin panel doesn’t help me.

    Regards,
    Bruno

    Plugin Author brijeshk89

    (@brijeshk89)

    Hi,

    I will add this by Tuesday and let you know.

    Plugin Author brijeshk89

    (@brijeshk89)

    Hi,

    Is it Tuesday already ?

    I have released a new version 1.4.0 which includes a function named “is_logged_in_using_ipbl” which will return true when a user is logged in with this plugin and will return false for all other cases. This function can be called from any other theme/plugin or any PHP file.

    Please update the plugin and check if this works for you.

    Let me know if you face any issues.

    You are amazing.
    Iwill try this feature tomorrow and send you back the result.
    Thank you very much for reactivity,
    Bruno

    This last feature works fine.
    Thank you again.
    You are great!
    Bruno

    Plugin Author brijeshk89

    (@brijeshk89)

    Hi,

    Glad to know it works.

    It would be great if you can leave a rating 🙂

    So, with this update, if a user is logged in via username and password, IP Login will NOT be active?

    We have library customers who want a private username and password to control their subscription settings, and to use IP recognition for their library users to view the content of the site, but NOT have access to the account settings (the username and password).

    In this instance, would we need to set up TWO accounts for each library? One that is username and password access (to view the user dashboard) AND IP access so that the library USERS can view the site content, but NOT access the user dashboard?

    Plugin Author brijeshk89

    (@brijeshk89)

    @adjunctadvocate This update does not affect any existing functionality. The whole plugin will work as it used to work before.

    Hi,
    The scenario mentioned by @adjuntadvocate is very interesting, we have a similar situation. However it does not work because the auto login by IP is replacing the login by user, causing the problem that an “admin user” cannot access from their center (library, or whatever) because is replacing the login by the auto login by IP.
    It would be a big step that the auto login only applies when is no user logged in, so no replacing what would be a higher authentication (user/password).

    @brijeshk89, is this attainable? Do you need any help or funds to improve this?

    Plugin Author brijeshk89

    (@brijeshk89)

    @sustec I just checked this and if you visit the wp-admin or wp-login.php page you will not be logged in and you will see the login form which you can use to login as any user you desire.

    IP Based Login already has the functionality that it tries to login as a user only if the user is not already logged in. If a user is logged in with username/pass this plugin does not interfere with that session.

    Also if you are logged in a the user defined for your IP. After login you can hover on the “Logged in by IP Based Login” button in the top bar and you can disable login temporarily and then you the plugin will not auto login and you can login with the username/pass with any user account.

    Let me know if this works for you.

    Hi @brijeshk89 Thank you very much for your quick response.
    Well, I’m not sure what happened, it was giving some problem with a test where the access to the site is restricted to admin users, the IP was set to a standard user, then the autologin was preventing the access to the page and asking every time for log in. So it looked like it was replacing the login.
    I removed that restriction, and it works as you say, the autologin is not replacing the user already logged. Just appears the option on the top bar saying “Logged in by…” even if the user remains the same (the user previously logged).
    That’s good.
    Your plugin is just great! I don’t want to ask too much, but just I would like to ask if some of these options are attainable and could be added eventually, because it might be a big enhancement in the plugin:
    – Autologin by URL referred, by entering URL instead IP
    – That the IP/URL could be entered in each user profile, as a field of the user account (to organize easier the configuration by user).
    – Import/export the records (IP/users), to handle and creat records massively.

    As I said before, your plugin and work are very appreciated! Anything I can help, let me know!
    Thank you very much!

    Plugin Author brijeshk89

    (@brijeshk89)

    @sustec

    >> Just appears the option on the top bar saying “Logged in by…” even if the user remains the same (the user previously logged).

    I did notice this and I have fixed this 2 days back in v1.4.1, please check if you still face this issue with the latest version.

    >> – Autologin by URL referred, by entering URL instead IP
    – Import/export the records (IP/users), to handle and creat records massively.

    These two are doable and I’ll add it soon.

    >> – That the IP/URL could be entered in each user profile, as a field of the user account (to organize easier the configuration by user).

    I will review how this will work.

    It would be great if you could leave a review for our plugin 🙂

    – v.14.1:
    Perfect, I updated to the last version and is fixed.

    – URL referred, importation…
    Awesome! Thank you for taking those into consideration.

    Of course, I just made a review, thank you very much!

    Plugin Author brijeshk89

    (@brijeshk89)

    Hi,

    Glad to know it works with latest version.

    I will update here once I add the features you requested.

    Thank you for your feedback in improving the plugin.

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