do_action( 'wp_set_password', string $password, int $user_id, WP_User $old_user_data )
- Since
- 6.2.0, 6.7.0
Fires after the user password is set.
Compatibility
- WordPress
- since 6.7.0
- 6.7.10
- 6.8.11
- 6.9.10
- 7.0.7
- 7.1.3
Present in every tracked release (6.7.10 to 7.1.3).
Parameters
$passwordstring- The plaintext password just set.
$user_idint- The ID of the user whose password was just set.
$old_user_dataWP_User- Object containing user's data prior to update.
Where this hook fires · 1
wp-includes/pluggable.php:3027wp_set_password()
Source code
<?php * @since 6.7.0 The `$old_user_data` parameter was added. * * @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. */ do_action( 'wp_set_password', $password, $user_id, $old_user_data ); }endif; if ( ! function_exists( 'get_avatar' ) ) : /** * Retrieves the avatar `<img>` tag for a user, email address, MD5 hash, comment, or post.Changelog
Introduced in 6.2.0. Unchanged from 6.7.10 through 7.1.3.
Signature, return type and hooks compared across 5 parsed releases.
6.7.0
The
$old_user_data parameter was added.from the docblock6.2.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.11 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.