Support

Home Forums Event Espresso Premium Need a hook to tell if someone already registered for an event

Need a hook to tell if someone already registered for an event

Posted: June 9, 2016 at 7:08 am


Samantha

June 9, 2016 at 7:08 am

In our case, all our events are tied to our users, and once they are registered, they should not be able to register again. I would like to give them a message that says they are already registered if they try to register again for that event. What hook could I use to accomplish this? Thank you!


Josh

  • Support Staff

June 9, 2016 at 2:00 pm

Hi there,

The FHEE__EE_SPCO_Reg_Step_Attendee_Information___process_registrations__pre_registration_process hook was added for to allow this sort of functionality to be added with a plugin.

https://github.com/eventespresso/event-espresso-core/blob/master/modules/single_page_checkout/reg_steps/attendee_information/EE_SPCO_Reg_Step_Attendee_Information.class.php#L865


Samantha

June 9, 2016 at 7:50 pm

I think I should have said “need filter”. I’m guessing someone hasn’t already done this. Is there a sample where someone else has used this hook that I can look at? I will give it a shot but I haven’t done one of these on my own before. Thanks!


Tony

  • Support Staff

June 10, 2016 at 8:01 am

Hi Samantha,

The EE4 User Integration add-on uses the filter hook Josh provided to check for a current user based on the email address provided during the registration.

You can take a look within EED_WP_Users_SPCO.module.php at the verify_user_access() method for an example of how to use that hook.

The support post ‘Need a hook to tell if someone already registered for an event’ 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