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?