Hey Matthew,

2011/6/22 Matthew Sherborne <[email protected]>:
> Hi Koen,
> So I was trying to make it work keeping the same session and overriding
> refresh(), just because I want to keep the 'logged in state' of users.
> So if I switch to having reload create new app instance, could you recommend
> a way to remember the current user ? maybe custom cookies or something ?

As you find out, setting reload-is-new-session to false is indeed not
helping you. Your user will get a new session if he uses an external
link or bookmark to open your application.

To remember the user across sessions you should use a custom cookie.
Usually you simply store a random token in the cookie which identifies
(or, optionally even authenticates) the user, storing the toking also
in the user table with an expiry date. To create the random token you
could use WRandom::generateId() which uses a high-entropy random
generator if available.

Regards,
koen

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to