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?
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);
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.
Support forum for Event Espresso 3 and Event Espresso 4.