Support

Home Forums Event Espresso Premium EE3 – Registration ID Unique?

EE3 – Registration ID Unique?

Posted: June 24, 2014 at 1:23 pm

Viewing 4 reply threads


Eric McClintock

June 24, 2014 at 1:23 pm

Hello,

I just want to confirm how the registration ID’s (For example, ID: 4-53a9cb58cdc3c) are generated? The main concern I have is someone being able to generate valid registration ID’s and view individual registration details on the Thank You page.

Are these fairly unpredictable in terms of the registration ID, or better yet are they generated unique to the specific WordPress site?

Thanks,
Eric


Josh

  • Support Staff

June 24, 2014 at 1:51 pm

Hi Eric,

It turns out that part of the registration ID is generated by uniqid().

There is also a filter in place that you can use to remove the way Event Espresso 3 does it and replace with your own function to generate the registration ID to make the way it generates the ID unique to your site only. Example code follows:

// remove default registration id filter
function my_remove_registration_id_filter() {
	remove_filter('filter_hook_espresso_registration_id', 'espresso_build_registration_id', 10);
}
add_filter ('filter_hook_espresso_registration_id', 'my_remove_registration_id_filter', 9 );

// add custom registration id filter

function my_custom_registration_id(){
        
        // cryptographically secure random ID generator function gets called here
	
        $id = my_crypto_secure_function();

	return $id;
}

add_filter('filter_hook_espresso_registration_id', 'my_custom_registration_id', 10, 1);


Eric McClintock

June 25, 2014 at 6:25 am

Great, thanks!


Dean

June 25, 2014 at 6:38 am

Hi Eric,

Has Josh’s answer resolved this question? Can the thread be marked as resolved? Thanks!


Eric McClintock

June 30, 2014 at 11:12 am

Hello,

Yes, please mark it as resolved.

Thanks,
Eric

Viewing 4 reply threads

The support post ‘EE3 – Registration ID Unique?’ 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