I wonder how to disable logging into the one account, eq. admin from 2 different places/PC’s/browsers/so on using CodeIgniter Session Class and MySQL database?
Any suggestions?
I wonder how to disable logging into the one account, eq. admin from 2
Share
Keep a “uniqueID” field for each account.
When the account sucessfully logs in, generate a random unique id and store it in that account, as well as store it in the session.
At the top of every secured page, verify the unique id in the session with that in the database, if they match, hurray. If not, it means that since the time this account logs in from this browser, someone else has used the same account and logged in from another browser. Just kick the current user out of the system then.