CakePHP Check Session exists in database

Viewed 2104

Im Using CakePHP 2.2.1 and im trying to improve my User Authentication with the Auth Component. When Users try to log in from multiple locations they get individual session IDs, what i want to do is kill the old session so the user cannot log in from multiple locations at the same time.

I converted how CakePHP saves its sessions using this post cakephp prevent user login from multiple locations at the same time but no answer was given on how to kill off the old session when the new one is created.

I thought about creating a Session Model and using that to select the records but im not sure if thats a safe route to go with.

I also read through the CakePHP documentation on the Session Component and CakeSession Datasource hoping there might be a hint but i wasnt able to find anything.

Any advice would be greatly appreciated.

2 Answers
Related