Support

Home Forums Event Espresso Premium Member Plugin: "Log in as user" breaks connection between registration & payment

Member Plugin: "Log in as user" breaks connection between registration & payment

Posted: May 7, 2021 at 1:30 pm


Somatic Practice

May 7, 2021 at 1:30 pm

I believe we are having an issue with the Members plugin, where using the “Log in as user” feature to assist customers can overwrite registrant info and/or break the link between a registrant and their related transaction info.

Example – in conference with our developer, he logged in as a user to help troubleshoot a student’s registration issue. Somehow, that student’s registration was overwritten with the developer’s name/contact info. Now the developer is shown as the registrant and the related transaction shows developer’s name/contact info rather than the student’s. Searching the student’s registrations I can no longer find this registration or payment transaction under her name. I have verified this by searching PayPal for the transaction ID, which correctly finds the transaction in the student’s name. As it happens I need to refund that student’s purchase. Is there a way to restore the connection between the registration and the transaction?

site is WordPress 5.7.1, EE 4


Tony

  • Support Staff

May 7, 2021 at 3:42 pm

Hi there,

What exactly did the developer do when logged into their account?

It sounds like they logged in and completed a registration using their (the developers) details, with the WP User integration add-on there is a function that syncs changes to the registration form up with your WP User account, which sounds like what has happened here.

Go to Event Espresso -> Registration Form -> User Integration Settings

What is the ‘Always sync contact information with WP user profile?’ setting set to?

If you search in your WP Users for your developers name, do you find multiple accounts or one? (I assume your developer has their own account on the site?)


Somatic Practice

May 7, 2021 at 4:42 pm

Hi . . . thanks for response.

“Always sync etc” is set to “Yes”
Dev has multiple accounts, registration was updated to contact record for his main admin user account.

This consult happened weeks ago, I am not sure exactly what steps he took and in what order. I do recall we looked at this student’s record, 99% certain he toggled back to his own login before proceeding to create a test record to answer another question I had. But I have noticed similar issues previously, especially if admin has other sessions active (toggling back and forth between logged in as registrant and logged in with admin profile). I am hesitant to use this feature most of the time for that reason.


Tony

  • Support Staff

May 11, 2021 at 5:24 am

Ok, so starting with this:

“Always sync etc” is set to “Yes”

Is that a feature you need/use?

Just to make sure it’s clear what that does if you log in and register onto an EE event, then on the Attendee Information step you change the primary registrant details (the FName, LName and Email will be pulled from your WP User account by default) then EE will Sync up your WP User account to match those details. Meaning if you change the EE registration form details you also change your WP User details.

The reason for that is to keep your WP user account in sync with your EE_Contact, we do that to make sure your registrations all keep synced to your account and the ESPRESSO_MY_EVENTS section shows all of your registrations.

If you don’t need that to happen, set the above to no and it will prevent this from happening again.

When switching between sessions and using multiple tabs it’s really easy to get sessions mixed up. Opening a registration with one session to view something, then switching sessions in another tab to view something else, then again switching back to the other tab (without switching the session back) and completing the registration as the ‘wrong’ user is easily done.

EE has no way to differentiate between one request and another other than current session.

Now, you need to apply a refund and want to log this into Event Espresso, right?

So to fix this we need to know more about what happened ad what data is available. In your opening post you said:

Searching the student’s registrations I can no longer find this registration or payment transaction under her name.

Is this registration the only one she has on the site?

If not can you see the others related to her?

If you go to Event Espresso -> Registrations -> Contact list.

Search for her name there, does it show her contact at all?


Somatic Practice

May 18, 2021 at 2:03 pm

Thanks for this answer, it is very helpful! So it sounds like I need to change that setting to “no” ongoing to prevent this error.

To answer your other question, yes this student does have a user profile and other registrations in the system. If I understand you properly it might be possible to change this one registration and re-associate it with her user account?


Tony

  • Support Staff

May 19, 2021 at 5:26 am

If the registration is simply assigned to the incorrect EE_Contact, and the other registrations are linked to the correct EE_Contact (meaning the other registration show the correct details and you can see the correct ID to use from those) then yes it is possible.

Officially, we don’t have an option in the UI to change the EE_Contact assigned to registration, however, I do have a snippet that can do it. Messing around with contacts like this and updating registrations with incorrect ID’s can really mess up the registrations linked to users so do this at your own risk.

The first thing to do is to note the current ID in use for the broken registration (just to have it).

Edit the broken registration and click to view the contact details. When viewing the EE_Contact for that registration it should show &post=xxx in the address bar.

Like this: https://monosnap.com/file/mCf96pmVWCWLbPiE8xou0hJeiB0WBC

That’s the current EE_Contact ID linked to that registration, make a note of it incase you need to switch it back (why, I don’t know but better to be safe here)

Now, find a ‘correct’ registration for this user and edit that contact, again note the EE_Contact ID from the address bar. Confirm this is correct by finding the WP User account for this user and edit their profile. At the bottom your should see a ‘View Linked Contact’ button, click that.

It should take you to an EE_Contact page, is the ID of that contact the same as the one you found for the correct registration? If so, great!

Add this snippet to the site: https://gist.github.com/Pebblo/239dcbbab9514c13ba48fe3e8e9a5add

Go back to the broken registration page and refresh it.

In the sidebar should be a ‘Contact ID’ metabox.

As you are on the broken registration when you refreshed it should have loaded whatever the developer’s Contact ID is in that field by default (as that’s what is set on the current registration you are viewing).

Change that to the correct ID from above, click Update Contact ID.

The Contact details should now change to the ‘correct’ details and that registration should show up in My Event sections for that user again.

All done, I recommend removing that snippet from the site again.

The support post ‘Member Plugin: "Log in as user" breaks connection between registration & payment’ 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.

Event Espresso