Make WordPress Core

Changeset 60712

Timestamp:
09/05/2025 06:04:20 PM (3 months ago)
Author:
davidbaumwald
Message:

Users: Pass WP_User object to wp_set_password action in during new user creation.

After [60634], wp_set_password is now fired during new user creation and existing user updates when a password is changed. wp_set_password expects the third argument to be a WP_User object of the user's data prior to the update. This change simply passes the newly created WP_User object.

Follow-up to [60634].

Props dd32.
See #22114.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r60697 r60712  
    25162516    if ( ! $update ) {
    25172517        /** This action is documented in wp-includes/pluggable.php */
    2518         do_action( 'wp_set_password', $userdata['user_pass'], $user_id, $userdata );
     2518        do_action( 'wp_set_password', $userdata['user_pass'], $user_id, $user );
    25192519    }
    25202520
Note: See TracChangeset for help on using the changeset viewer.