prevent multiple login with same account

3 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: May 22, 2015   (RSS)

By Dave - May 19, 2015

Hi Karls, 

That's a tricky one.  It's perfectly valid for a user requests to come from multiple IPs (if the ISP or router load balances over multiple connections).  It's also perfectly valid to have a thousands users behind one IP (such as a university or mobile phone network).  So you can't reliably use the IP address as a unique identifier.  

You could probably write a plugin that set a cookie or session variable to a random value on login, stored that value in the user's record in a new field, and then force logout any user that didn't have that value. Two users logging into the same account would keep getting logged out in that way.  

If you're worried about an account getting used by many users, though, what you could do is log the last 5 IPs and login/access dates for each user and then disable or temp ban any accounts that use more than X IPs in Y minutes.

Hope that helps!  Let me know any questions.

Dave Edis - Senior Developer

By ht1080z - May 22, 2015

Hi Dave,

Thank you for your reply.

I contact to consulting via mail for custom work.