Support

Home Forums WP User Integration Event Registration Creates New WP User

Event Registration Creates New WP User

Posted: April 26, 2021 at 10:41 am


Tony

  • Support Staff

April 26, 2021 at 10:54 am

Hi there,

However, if a new attendee registers for an event, an entry is added to the WP Users.

I can see you have LearnDash installed on the site and I assume you are also using the EE LearnDash add-on? If so, that is what is creating the user accounts during registration.

How can I prevent EE checking against the email addresses in the list of WP Users and allow them to register without getting the error message?

You can do this with a snippet and we have 2 options here:

https://gist.github.com/joshfeck/1131145859a3fab58f4d

The first one disables the check for logged out users only, the second disables it for all.

Add whichever one you prefer to a to a custom functions plugin on your site, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Possibly, for free events, does Event Espresso simply add this event to their list of events tied to their WP User account?

Apologies but I’m not sure I understand your question.

Registrations that are linked to an EE_Contact linked to a WP User account will show up in the ‘My Events’ section, both free and paid registrations will show up there. However, if users are logged in and use different details than those linked to their WP User profile (and you have the sync feature within EE turned off) then those registrations will not show up.


smdawg

April 26, 2021 at 1:57 pm

Thank you for the quick response, Tony.

We currently have the LearnDash add-on enabled. However, in practice, we are not really using that functionality. We are managing the course certificates outside of EE/LearnDash. So, I’m wondering, if we simply disable that add-on, would we stop creating those WP User accounts. I think it would, but wanted to ask.

I didn’t explain the last question well. My fault. What is the easiest way to manually connect an EE_Contact to a WP user account? Sometimes, we have attendees that have an account, but don’t log in when registering. If we turn off the LearnDash add-on (and it no longer checks for an existing account), is there an easy way to connect a registration to a user account so that the event shows up in the user’s list of courses?

Thanks again for the help!
-Steve


Tony

  • Support Staff

April 27, 2021 at 3:07 am

I think it would, but wanted to ask.

Just disabling the EE LearnDash add-on (you can keep LearnDash itself if preferred) should stop registrations creating WP Users if you have our setting set to No on the events.

In short, the EE LearnDash add-on creates user accounts for all registrations when it is enabled, I think it’s so they can always link the registration to the course. However, they don’t actually check if the event has courses assigned to them when doing so, so it always creates a user.

What is the easiest way to manually connect an EE_Contact to a WP user account?

Whilst it is possible to do this, you shouldn’t need to (more on this shortly as it ties in with your next question).

Sometimes, we have attendees that have an account, but don’t log in when registering. If we turn off the LearnDash add-on (and it no longer checks for an existing account)

So do they not use the same details as their WP user account when doing so? The reason I ask is the WP User integration add-on checks for users (not LearnDash) so if those users have been registering without login in already, how are they doing that if EE has been checking for their WP user account previously?

is there an easy way to connect a registration to a user account so that the event shows up in the user’s list of courses?

Courses here being EE events, right? (Just confirming you don’t mean LearnDash courses)

I’m going to explain a little on how EE registrations link to WP Users as otherwise, it’s difficult to follow what needs changing etc

When you register onto an Event EE creates multiple objects and for this example, the 2 we are interested in are the EE_Registration and EE_Contact.

An EE_Contact can be considered a ‘person’, so as an example, my EE_Contact:

ATT_ID – 777
Fname – Tony
Lname – Warwick
Email – me@example.com
Address etc (details that are linked specifically to the person and not the registration itself)

EE_Registrations are that persons individual registrations on events, example EE_Registration:

REG_ID 11
ATT_ID 777 (My EE Contact ID above)
EVT_ID 4444 (The event ID the registration is for)
TKT_ID 333 (The ID of the ticket this is for)
(Whole host of other registration specific data)

When you notice that the person is the same for all of their registrations it makes sense that you have just 1 EE_Contact linked to all of those EE_Registrations.

So with that EE Checks if there is already an EE_Contact for every registration created, if the Fname, Lname, Email match an existing EE_Contact, the Registration is linked to that and if not, a new one is created for the current registration.

Note – all of the above is within EE core and nothing to do with the WP User integration yet, which leads to….

So EE_Registrations 10,11,12,13 etc call all be linked to EE_Contact ID 777 (my contact) and the way we link that to a WP User account is user meta data on the EE_Contact itself. When you register onto an event with the WP User integration active, all of the above happens but there is also a check to see if your EE contact is linked to a WP User account and if not it links the two (again the Fname, Lname and Email must match the EE_Contact AND the WP User account exactly for this).

So EE_Contact 777 could be linked to WP_User ID 1234.

The My events section then pulls the EE_Contact ID linked to the current WP User account and lists out all registrations linked to that contact. This is the important part as it means registrations are linked directly to the WP User account, they are linked to the EE_Contact linked to the WP User account.

What all of that means is that to make sure the registrations shows up for a WP User account it needs 2 things.

1. The EE_Contact used on the registration is the correct contact for the WP User account.
2. The EE_Contact in question is actually linked to a WP User account.

Which means that yes, it is possible to ‘fix’ registrations that somehow have now been connected to a current users WP User account but how depends on what has happened. If they somehow got a new EE_Contact that isn’t the one linked to their account the registration will need the ATT_ID updating to use the correct EE_Contact ID, if they have an EE_Contact that isn’t already linked to a WP User account the user meta value needs to be set (can be done manually or by the user registering onto another event with the correct details).

The support post ‘Event Registration Creates New WP User’ 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