Posted: September 23, 2021 at 8:42 am
How can I associate a registration with a user’s account? We allow attendees to register for events without logging into the website. In this case, the attendee registered for an event but mistyped her email address, so the registration was not associated with her WP user account. How can I manually update her registration to associate it with her account. I want to be able to show all of the events (including this one) where she registered. In this case, she logged in and registered for two events – those two events show up on her account. Since this last registration is not connected to her account, it does not display in her list of registrations for her account. I would like to manually add this registration to her account so that all 3 events are displayed when she logs into her account.
Thank you for your help,
Officially, we don’t have a way to update this through the UI. You would need to cancel the original registration and either have the user recreate it whilst logged in or you can switch to the user yourself and register on the front end using their account.
However, I do have a snippet that allows you to set the ‘Contact ID’ of a registration which should allow you to do the above.
First, find the correct EE COntact ID for the user in question, because you mentioned this:
It means her WP User account is liked with an EE Contact already, so find one of the registrations for her ‘correct’ contact in Event Espresso -> Registrations.
Click on the registration and view the contact info on the top right, click to View/Edit the contact.
In the address bar you’ll see
(Or find her account in Dashboard -> Users, edit the account and you’ll see a ‘View Linked Contact’ button, click that and it takes you to the same page as above)
Now you have the correct contact ID, add this to your site:
You can add that to a custom functions plugin on your site, we have some documentation on creating one here:
That adds a ‘Contact ID’ metabox when you edit the registration and will load with the current contact ID for the registration.
That registration is assigned to Contact ID 62 (which as we saw above is the correct ID for my contact). So find the ‘incorrect’ registration and update the Contact ID to be linked to the correct contact.
Side note – double/triple check you are updating the correct registrations here. Messing around with Contact ID’s and getting it wrong cause end up messy (which is one of the reasons we don’t have an officially method for it right now).
The support post ‘How to add an event registration to a user account?’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.