Created
September 8, 2022 12:35
-
-
Save nikitasinelnikov/1091d6449e9a7823feb1036cfac11c4f to your computer and use it in GitHub Desktop.
Ultimate Member v3: Password Reset 'um_before_changing_user_password' hook
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
// 'um_change_password_process_hook' - use action hook 'um_before_changing_user_password' instead | |
/** | |
* Fires just before the Reset Password process when Ultimate Member Reset Password form data is validated. | |
* | |
* Note: Use this hook for adding custom actions before reset user's password form. It's the first hook after the validating form data. | |
* | |
* Hook: um_before_changing_user_password | |
* | |
* 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_changing_user_password( $user_id = null ) { | |
// Code that you need to run before user password reset via the Ultimate Member - Password Reset form | |
} | |
add_action( 'um_before_changing_user_password', 'my_before_changing_user_password', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment