wppaste
WordPress

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.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

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 · 3

  • wp-includes/pluggable.php:3134wp_set_password()
  • wp-includes/user.php:2582wp_insert_user()
  • wp-includes/user.php:2769wp_update_user()

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.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

6.7.0
The $old_user_data parameter was added.from the docblock
6.2.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 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.