I followed all of the steps in https://support.wix.com/en/article/wix-code-tutorial-building-your-own-members-area and I have the custom member's area working. The issue I am having is I have existing data for members but they are not linked to the user's accounts. For example, I have a record in the collection has an email of email@example.com. If I log in to the members area, a new record gets created with firstname.lastname@example.org. I know that this happens because the _id hidden field is different than what is already in the collection.
My question is, what is the easiest way to merge the 2 records together? I ask because the existing records are tied to another collection of results, so I would need the newly created record to be tied to those same results, or have something that ties the newly logged in user to the existing record in the collection.