How can i check if a user already online in site?

I want to prevent multiple use of same member account on my site. So how can i check if a account already in use at the same time when some one logs in?

Guys i am having this problem for 2 days and nobody helps me is there anyone know to prevent multiple account use of members?

I don’t think there’s a fast and reliable way around it, but how about this.

  1. On login create a record on a database.

  2. On logout delete that record.

Also,

  1. On login check if there’s a record if there is automatically logout the user and post a message saying ‘unable to log in because you’re already singed on with another device’

If you want to logout the other user, maybe you’d need a function that runs every 1 minute or so that checks if there is another user logged in and based on that logout the user

thanks a lot carlos i will work on this. But unfortunatelly i don’t know much about coding how can i get help for your suggested code?

Hi cemil,
You can go to the following website to learn coding for wix
https://support.wix.com/en/corvid-by-wix/code-tutorials

There also is the corvid api website that has pieces of code that u can use and adjust to your elements/needs.

https://www.wix.com/corvid/reference

Kind regards
Kristof.

thanks a lot :slight_smile: