4
I am having a problem in logout of my system, it until it is logging out correctly and destroying the sessions, but if the user clicks the back button of the browser it goes back to the previous page of the system where all the data is displayed again. The code is like this:
public function logout()
{
$this->session->sess_destroy(); //destroi a sessao
redirect('/'); // redireciona para a raiz do sistema(pagina de login)
}
Even destroying the session, he can access the previous page of the system, the session checks within the program are correct, because if he clicks on a link and goes to another module he will be expelled from the system.
Can anyone help me?? Thank you :)
I think a good practice is to analyze the Sesssions before rendering the content. If the session is empty, redirect to the login.
– rpereira15