With a given script php+mysql i need to add the option to prevent the user to login with same credentials at the same time (Netflix Mode).
I attach the sql and [login to view URL] class
The SQL of a single user already store those information :
INSERT INTO `users` (`id`, `username`, `fname`, `lname`, `membership_id`, `mem_expire`, `email`, `salt`, `hash`, `token`, `userlevel`, `type`, `lastlogin`, `lastip`, `avatar`, `address`, `city`, `state`, `zip`, `country`, `notify`, `access`, `notes`, `info`, `newsletter`, `stripe_cus`, `created`, `active`) VALUES ('2', '4AHfNzFr', 'Test', 'Test', '0', '', '[login to view URL]', 'Nn6RiguAWJlas4nx6.47N', '$2a$10$Nn6RiguAWJlas4nx6.47N..oK5UscdAQS/FGKX5obXq3CABwtA316', '0', '1', 'member', '2021-01-20 20:08:07', '5.170.8.0', '[login to view URL]', 'Test', 'Milano', 'Mi', '28070', 'IT', '0', '', '', '', '1', '', '2019-11-18 02:49:21', 'y');
I attach the [login to view URL] class that i suppose needs to be modified.
Main GOAL: when the user is already logged nobody else can login too with an advise that a user is already logged. That's all