php - Manually Logout from previous browser session if user login in any new browser in Cakephp 3 -


i working on cakephp 3.

i need user login once @ time.

i using cakephp auth component login app. worked database session , cake session.

but when try delete session manually database or delete session file form app/tmp/session, session re-create again.

i don't want disallow second login of user, want destroy previous session.

how can achieve single session of user in cakephp 3.

you can store current session id of user in users table:

  • before login, check if current session id present in users table user.

  • if session id present, destroy old session deleting sessions table.

  • after login, store generated session id.


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -