Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andrej Farkaš 9 posts 99 karma points
    Feb 13, 2019 @ 09:35
    Andrej Farkaš
    0

    Logout member when another person is logged in with same credentials

    I would like to ask if it's possible to logout member when another person is logged in with same credentials.

    I'm working on a website, where 1 or 3 people can be logged in with same credentials, depending on license type. Is it possible?

  • Tarik | WPPlumber 179 posts 801 karma points c-trib
    Feb 16, 2019 @ 23:10
    Tarik | WPPlumber
    2

    Andrej Farkaš, I see as a solution to achieve that result by using the following:

    1. When the user logged in store a guid to represent his session as authentication cookie and store a variable in the database too.
    2. Everytime user request access for a page compare the token on the cookie with that in database when it is the same allow access, in case 2nd or 3rd member logged in which means cookie token changed and database guid changed compared to 1st user authentication cookie and then deny access by log him out.
Please Sign in or register to post replies

Write your reply to:

Draft