So, in my php authentication library, if someone is not logged in, they are redirected to the home page:
redirect('home/index');
The problem is that I have modal windows that load content through ajax. If the user somehow logged out (but still on the page where they "logged in"), the modal shows the login page, since the modal was "redirected" to the home page.
This problem may occur if the user has not done anything for a long time (and logged out), or if they have several tabs open and exit on one of them, and on the other hand try to open a modal pop-up window.
Is there a way to redirect the whole window?
source
share