Created
September 9, 2022 13:00
-
-
Save nikitasinelnikov/e9ac9207141f88b59a8cabf1357fc809 to your computer and use it in GitHub Desktop.
Ultimate Member v3: Custom redirect after Lost Password form submission
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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