I just finished my work on registration and login of my latest Cakephp application (Auth Component). Does anyone knows how to prevent multiple logins on the same browser or computer in Cakephp 3? I have no idea to start with.
Please help, thanks.
Just a thought:
I would store a user_id field in sessions when they login so I can track user is online or not. Also you have to destroy session on user logout.
CREATE TABLE `sessions` ( `id` varchar(255) CHARACTER SET utf8 NOT NULL, `data` text, `expires` int(11) DEFAULT NULL, `created` datetime NOT NULL, `user_id` int(11) unsigned DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Created: 27 Sep '16
Last Reply: 28 Sep '16
Start baking your own CakePHP application!