Wednesday, December 31, 2008

Re: Problem with auth component

if I understood the thread opener he wants to have an automagical
redirect to the login page after x min of inactivity by the user where
x is the SessionTimeout.
If you want that, I do not think CakePHP does it. Typo3 for instance
does that (and it is very annoying being a developer to have that
feature enabled because it popups windows all over the place).

How you could do it manually:
- Set / Refresh a specific cookie everytime the user does an action
- Have a Javascript/Ajax method that starts counting down after a page
was loaded until SessionTimeout should be reached. Do an Ajax call to
see if the session is still available. The user could have navigated
on other tabs tough, there he might have written the cookie to a newer
date. Fetch that cookie to your js and start counting again.

Do not forget: this relys on javascript that can do ajax calls
(xmlhttprequest) and cookies being enabled on the useragent side.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: