wp_set_password action-hookWP 6.2.0

Fires after the user password is set.

Usage

add_action( 'wp_set_password', 'wp_kama_set_password_action', 10, 3 );

/**
 * Function for `wp_set_password` action-hook.
 * 
 * @param string  $password      The plaintext password just set.
 * @param int     $user_id       The ID of the user whose password was just set.
 * @param WP_User $old_user_data Object containing user's data prior to update.
 *
 * @return void
 */
function wp_kama_set_password_action( $password, $user_id, $old_user_data ){

	// action...
}
$password(string)
The plaintext password just set.
$user_id(int)
The ID of the user whose password was just set.
$old_user_data(WP_User)
Object containing user's data prior to update.

Changelog

Since 6.2.0 Introduced.
Since 6.7.0 The $old_user_data parameter was added.

Where the hook is called

wp_set_password()
wp_set_password
wp_insert_user()
wp_set_password
wp_update_user()
wp_set_password
wp-includes/pluggable.php 3130
do_action( 'wp_set_password', $password, $user_id, $old_user_data );
wp-includes/user.php 2563
do_action( 'wp_set_password', $userdata['user_pass'], $user_id, $user );
wp-includes/user.php 2750
do_action( 'wp_set_password', $plaintext_pass, $user_id, $user_obj );

Where the hook is used in WordPress

Usage not found.