Welcome Guest, Not a member yet? Register   Sign In
Session expired redirect on login page
#1

[eluser]Unknown[/eluser]
i m new in CI and developing a module

i have problem, after login i m redirecting user on the user's home page and if user not visit any page of the site session get expired therefore all the variable of session get lost. Now when user is refreshing page he/she is getting sql error because session_user_id is null in sql query.

please help if the session has been expired and user refresh the same page then he will redirect on login page.

how to check that session has been expired.


Thanks
#2

[eluser]Michael Wales[/eluser]
You should be checking for a valid login session (however you are managing that) within every protected method, not just the login handler.




Theme © iAndrew 2016 - Forum software by © MyBB