Redirect after email confirmation

Redirect after successful email confirmation

This function will redirect users after successful email confirmation.

Make sure to:

  • change the text that users will see before redirect on line 8
  • change the time before redirect (time is in seconds) from the content=’3; on line 8
  • change redirect location in $locationURL variable on line 7

wppb_success_email_confirmation is located in Profile Builder: /front-end/register.php

1
2
3
4
5
6
7
8
9
/*
 * Redirect after successful email confirmation. Tag: email confirmation, redirect
 */
 
add_filter( 'wppb_success_email_confirmation', 'wppbc_email_confirmation_redirect' );
function wppbc_email_confirmation_redirect(){
	$locationURL = "http://www.cozmoslabs.com/success/";
	return "<p class='success'>The Email was successfully confirmed. If you see this page for more than 3 second, please <a href='{$locationURL}'> click here</a>. <meta http-equiv='Refresh' content='3;url={$locationURL}' /></p>";
}

Redirect after failed email confirmation

This function will redirect users after failed email confirmation.

Make sure to:

  • change the text that users will see before redirect on line 8
  • change the time before redirect (time is in seconds) from the content=’3; on line 8
  • change redirect location in $locationURL variable on line 7
1
2
3
4
5
6
7
8
9
/*
 * Redirect after failed email confirmation. Tag: email confirmation, redirect
 */
 
add_filter( 'wppb_register_failed_user_activation', 'wppbc_email_confirmation_fail_redirect' );
function wppbc_email_confirmation_fail_redirect(){
	$locationURL = "http://www.cozmoslabs.com/fail/";
	return "<p class='error'>There was an error while trying to activate the user. If you see this page for more than 3 second, please <a href='{$locationURL}'> click here</a>. <meta http-equiv='Refresh' content='3;url={$locationURL}' /></p>";
}