I have activated in settings SESSION_EXPIRE_AT_BROWSER_CLOSE
so that when the browser is closed the session is closed.
I have a function so that when the session closes I do some tasks in a table of the database, it works correctly.
But it only works when the LOGOUT option is given, when I close the browser it does not work.
Then I think, when the session closes when the browser is closed, does not it call the LOGOUT function? How could I do to force him to go through LOGOUT and perform the task I want?