Support

Home Forums WP User Integration Additional Attendee Email Already Exists

Additional Attendee Email Already Exists

Posted: March 14, 2016 at 1:03 am


Josh

  • Support Staff

March 14, 2016 at 10:04 am

Hi kellyjo,

You can achieve this by removing the part of the code where it checks whether they are logged in. So this:

if ( ! is_user_logged_in() ) {
  return false;        
 } else {
  return true;
}

becomes:

return false;

Along with that, you may want to disable the Always sync contact information with WP user profile? setting in Event Espresso > Registration Form > User Integration Settings. This will help avoid any issues where the individual registering for a group could unintentionally update another’s contact record to have incorrect information.


kellyjo

March 18, 2016 at 8:23 pm

Hey Josh,

This code is already in functions.php. I have already tried it and even tried messing with it so it will always return false. I tried disabling the sync too.

I need customers to be able to buy a ticket for their friends, who may have already signed up for the website at an earlier date.

When I try to sign up someone who already has an existing email in the system, an error pops up. I’m already using the code you provided, but this code seems to be getting ignored when it comes to additional attendees.

I need help to bypass the checking of additional attendee emails. Why does EE4 care if they are in the system or not? Whether they are in the system or not, EE4 shouldn’t care either way.


kellyjo

March 18, 2016 at 9:06 pm

The code you gave me should work, Josh, but for additional attendees, it is getting ignored. I was able to find a workaround for this.

The code is in EED_WP_Users_SPCO.module.php.


if ( is_user_logged_in() ) {
$current_user = get_userdata( get_current_user_id() );
if ( $current_user->user_email === $user->user_email ) {
continue;
} else {
$error_message = '<p>' . __( 'You have entered an email address that matches an existing user account in our system. You can only submit registrations for your own account or for a person that does not exist in the system. Please use a different email address.', 'event_espresso' ) . '</p>';
$stop_processing = true;
$field_input_error[] = 'ee_reg_qstn-' . $registration->ID() . '-email';
}

On line 387:

stop_processing = true;

I commented this line out.

And I added:


continue;


Josh

  • Support Staff

March 21, 2016 at 3:33 pm

Hi there,

You’ll lose your modification the next time you update. If the filter function isn’t working when it loads from functions.php, it might be loading too late. In which case loading it from another plugin will help.

re:

Why does EE4 care if they are in the system or not? Whether they are in the system or not, EE4 shouldn’t care either way.

It turns out that the part of the WP User Integration that checks to see if there is already a registered user with that email was requested by other customers. The idea was to keep the data between attendees and user accounts in sync.


kellyjo

March 22, 2016 at 5:38 pm

I will try to put it directly into my functions.php file then Josh. I definitely had that concern of the plugin updating, than I would have to redo it. I appreciate your help. I’ll leave this for thread alone for another few weeks for testing purposes and then mark it as resolved once I see there are no issues.

The support post ‘Additional Attendee Email Already Exists’ 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