Last active
January 17, 2024 08:07
-
-
Save champsupertramp/8da7b1f9efc0b3ff0b4947e7dffce6fe to your computer and use it in GitHub Desktop.
Ultimate Member - Password Reset Link in Welcome Email
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
// Usage: Add this short tag to any Email Template in UM > Email settings: {password_reset_link_v2} | |
/** | |
* UM Placeholders for reset password | |
* | |
* @param $placeholders | |
* | |
* @return array | |
*/ | |
function um_121520_add_placeholder( $placeholders ) { | |
$placeholders[] = '{password_reset_link_v2}'; | |
return $placeholders; | |
} | |
add_filter( 'um_template_tags_patterns_hook', 'um_121520_add_placeholder', 10, 1 ); | |
/** | |
* UM Replace Placeholders for reset password | |
* | |
* @param $replace_placeholders | |
* | |
* @return array | |
*/ | |
function um_121520_add_replace_placeholder( $replace_placeholders ) { | |
$replace_placeholders[] = UM()->password()->reset_url(); | |
return $replace_placeholders; | |
} | |
add_filter( 'um_template_tags_replaces_hook', 'um_121520_add_replace_placeholder', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, thanks for the code, just a question.
It leads straight to :
https://mydomain.com.au/password-reset/?updated=invalidkey
Do you have any idea how to help on that?
Thanks you very much!