Skip to content

Instantly share code, notes, and snippets.

@nikitasinelnikov
Created September 8, 2022 12:31
Show Gist options
  • Save nikitasinelnikov/288f1f59f7a8cafde9d8edc3e0cb19cb to your computer and use it in GitHub Desktop.
Save nikitasinelnikov/288f1f59f7a8cafde9d8edc3e0cb19cb to your computer and use it in GitHub Desktop.
Ultimate Member v3: Password Reset 'um_before_send_lostpassword_link' hook
// 'um_reset_password_process_hook' - use action hook 'um_before_send_lostpassword_link' instead
/**
* Fires just before the Lost Password process when Ultimate Member Lost Password form data is validated.
*
* Note: Use this hook for adding custom actions before lost user's password form. It's the first hook after the validating form data.
*
* Hook: um_before_send_lostpassword_link
*
* Type: action
*
* @package um\core
* @since 3.0.0
*
* @param {int|null} $user_id User ID whose password was lost or null if user doesn't exist.
*/
function my_before_send_lostpassword_link( $user_id = null ) {
// Code that you need to run before sending email notification with the lostpassword link
}
add_action( 'um_before_send_lostpassword_link', 'my_before_send_lostpassword_link', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment