API
Version 7.x > API > How to detect member Multi login View modes: 
User avatar
Member
Member
Louis - 8/11/2013 3:04:50 AM
   
How to detect member Multi login
Hi Everyone,
I'm currently developing a eCommerce website. One of the requirement is user cannot log in from different computer at the same time. I wonder what is the best way for me to detect their IP address and block them from logging in from multiple places.

Thanks

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 8/12/2013 7:57:07 AM
   
RE:How to detect member Multi login
You can simply use
HTTPHelper.GetUserHostAddress();
to get their IP address. Then you can use the users last logon date and last login information (holds IP they last logged in with), then depending on the license you purchased you could use the On-line users feature to see if the logging on user is already logged on. I belive you have need an Ultimate license for te On-line users feature. If you have that license, then take a look at the /CMSModules/Membership/Pages/Users/General/User_online.aspx (.cs) and that will assist you with the online users.

User avatar
Member
Member
Louis - 8/12/2013 8:44:13 PM
   
RE:How to detect member Multi login
Thanks mate, I will try this.