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
When you are starting the session, store the current time in a session variable. You can use a session_expire_checker
function which will check current time and stored time to determine whether the session has expired. You should call the function from the constructor so that every function call will use this function automatically. In that function if session is expired, you redirect to another controller.
You have to use separate controller for the redirected URL, otherwise there would be infinite redirect.