I want to redirect to my login page when my session is expired. What happens now:
When you are for example logged in and at the dashboard, you will see you're username in the right top corner. But when you don't do anything for 2 hours or so and then refresh you get an error that it's impossible to access an attribute 'username' of NULL. This comes because you're logged out... But how can I redirect to the login page when my session expires?
I know how I can increase the expire time but I don't know how I can redirect ..
check if username is set in your session