Welcome Guest, Not a member yet? Register   Sign In
when session expires?
#1

[eluser]newbie boy[/eluser]
hi guys...

could you help me with my problem?

here's the thing...

the session works perfectly with the timely expiration given...

i need to figure out a way when a user log in again after his/her session expires it will redirect to the last page he/she visited on my site.

hope you can help me...

thanks guys...
#2

[eluser]Thorpe Obazee[/eluser]
I'm guessing you'd need a cookie with a longer expiration date to store the information.

Another option is to store his location via database so that whenever he/she logs in, the system knows on what page he was anywhere he logs in.
#3

[eluser]newbie boy[/eluser]
bargainph,

tol, explain pls!
#4

[eluser]Thorpe Obazee[/eluser]
Track his location from anywhere on the site and store it in the database. When he logs in, redirect him to that page.
#5

[eluser]tonanbarbarian[/eluser]
the other option is to detect that page they were trying to visit when it was detected that the session expired. then you redirect to the login page and include that location in a hidden field, after login you redirect to the location and they can continue as if they were not really logged out

you can try to pass the data in the get and post,or you can store in a seperate cookie as suggested
cookie is probably best because the get and post will contain / which is a bit of a pain to process
#6

[eluser]tonanbarbarian[/eluser]
just thought of something
if you build your authentication library the right way you can make this all seemless, or almost

if the authentication lib detects the session timeout, and instead of redirecting to the login page basically hijacks the current controller/method processing and simply displays the login page and ends.
this means that the login page will be displayed on any url on the site
The login page is then instructed to submit to the current url, where the authentication library intercepts the login request, processes it and if successful redirects to the same url, but it is now logged in.
In this way the url stays the same while the user is logged out and then logs back in
#7

[eluser]Thorpe Obazee[/eluser]
[quote author="newbie boy" date="1245742729"]bargainph,

tol, explain pls![/quote]

tol, mag-cookies ka na lang Tongue
#8

[eluser]newbie boy[/eluser]
tonanbarbarian,

the library auth, how?

thanks...
#9

[eluser]Thorpe Obazee[/eluser]
[quote author="newbie boy" date="1245760702"]tonanbarbarian,

the library auth, how?

thanks...[/quote]

You would load a different view file (login) if it can't detect the session.




Theme © iAndrew 2016 - Forum software by © MyBB