Expire session automatically and detect if the session has expired in Codeigniter

后端 未结 5 1656
粉色の甜心
粉色の甜心 2021-02-06 13:37

I\'ve seen plenty of questions here about my topic but it seems I still haven\'t found my answer. What I\'m actually looking for is when the session expires the user will be aut

5条回答
  •  忘了有多久
    2021-02-06 14:18

    Codeigniter does not "fire an event" when the session expires. So either you write some code in each controller function to check if the user is still logged in. Or you use some small js in the footer (which I personally prefere):

    
    

提交回复
热议问题