How to merge or copy anonymous session data into user data when user logs in?

Posted by benhoyt on Stack Overflow See other posts from Stack Overflow or by benhoyt
Published on 2010-06-11T15:44:52Z Indexed on 2010/06/11 16:32 UTC
Read the original article Hit count: 182

This is a general question, or perhaps a request for pointers to other open source projects to look at:

I'm wondering how people merge an anonymous user's session data into the authenticated user data when a user logs in. For example, someone is browsing around your websites saving various items as favourites. He's not logged in, so they're saved to an anonymous user's data. Then he logs in, and we need to merge all that data into their (possibly existing) user data.

Is this done different ways in an ad-hoc fashion for different applications? Or are there some best practices or other projects people can direct me to?

© Stack Overflow or respective owner

Related posts about python

Related posts about web-development