Skip to content

Instantly share code, notes, and snippets.

@nikitasinelnikov
Created September 9, 2022 13:00
Show Gist options
  • Save nikitasinelnikov/e9ac9207141f88b59a8cabf1357fc809 to your computer and use it in GitHub Desktop.
Save nikitasinelnikov/e9ac9207141f88b59a8cabf1357fc809 to your computer and use it in GitHub Desktop.
Ultimate Member v3: Custom redirect after Lost Password form submission
/**
* Use real URLs instead of {user_exists_url}, {user_doesnot_exist_url} placeholders.
*/
function um_012722_redirect_after_sending_password_reset( $user_id = null ) {
if ( is_numeric( $user_id ) ) {
// user exists
wp_redirect( '{user_exists_url}' );
} else {
wp_redirect( '{user_doesnot_exist_url}' );
}
exit;
}
add_action( 'um_after_send_lostpassword_link', "um_012722_redirect_after_sending_password_reset", 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment