douyanzan9145 2013-03-10 17:45
浏览 33
已采纳

PHP Zend Framework在注销时在所有浏览器中杀死会话

I can login to my application using firefox and google chrome. When I click logout of google chrome, it goes back to the login screen. However, the user is still logged into firefox. How do I remove the sessions from both firefox and google chrome when I log a user out of one of the browsers.

Thanks!

  • 写回答

1条回答 默认 最新

  • douben7493 2013-03-10 17:55
    关注

    One solution is to store each session_id with user_id in db table, for example:

    table active_session
    id: primary key
    user_id: int 11
    session_id: varchar(50)
    login_time: timestamp
    

    then if you want to terminate one session, you can search for user_id using session_id, then, delete all other sessions from the table.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题